Class to provide a unified area of authentication/authorization checking.
Inheritance: IHttpModule
Esempio n. 1
0
 /// <summary>
 /// Returns whether or not the current user has the passed in Right.
 /// </summary>
 /// <param name="right"></param>
 /// <returns></returns>
 public static bool IsAuthorizedTo(Rights right)
 {
     return(Right.HasRight(right, Security.GetCurrentUserRoles()));
 }
Esempio n. 2
0
 /// <summary>
 /// Returns an IEnumerable of Rights that belong to the ecurrent user.
 /// </summary>
 /// <returns></returns>
 public static IEnumerable <Right> CurrentUserRights()
 {
     return(Right.GetRights(Security.GetCurrentUserRoles()));
 }