IsUserInRole() public static method

public static IsUserInRole ( string groupName ) : bool
groupName string
return bool
Ejemplo n.º 1
0
 public bool RemoveFromRole(string roleName)
 {
     if (SecurityData.IsUserInRole(this.UserName, roleName))
     {
         SecurityData.RemoveUserFromRole(this.UserName, roleName);
         return(true);
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 2
0
 public bool AddToRole(string roleName)
 {
     if (!SecurityData.IsUserInRole(this.UserName, roleName))
     {
         SecurityData.AddUserToRole(this.UserName, roleName);
         return(true);
     }
     else
     {
         return(false);
     }
 }