I understand that a good way to check if an user is in a role is:
if (User.IsInRole("Admin"))
{
}
However How can I check if my user is in one of the “Author”, “Admin” or “Super” roles? Is there a way to do this without coding “User.IsInRole” for each of the roles?
EDIT: Without coding each role, do it a LINQ extension method, like so:
For usage, do:
Or without the extension method: