title: Is there another way I can check the .net role a user is in?
body: <p>I have many checks to determine what role a user is in 
  and then assign a role number. Is there some way that
  I could simplify the checks?</p>
  
  <pre><code>        if (User.IsInRole("Super"))
          {
              ViewBag.Role = 30;
          }
          else if (User.IsInRole("Admin"))
          {
              ViewBag.Role = 20;
          }
          ...
          ...
          else if (User.IsInRole("Guest"))
          {
              ViewBag.Role = 10;
          }
          else
          {
              ViewBag.Role = 5;
          }
  </code></pre>
  
  <p>What I need to do is find the highest role the user is in and then assign that value to ViewBag.Role which is a dynamic variable. The code above does work but all the if and else statements don't look like good coding practice to me.</p>