public bool RemoveFromRole(string roleName) { if (SecurityData.IsUserInRole(this.UserName, roleName)) { SecurityData.RemoveUserFromRole(this.UserName, roleName); return(true); } else { return(false); } }
public bool AddToRole(string roleName) { if (!SecurityData.IsUserInRole(this.UserName, roleName)) { SecurityData.AddUserToRole(this.UserName, roleName); return(true); } else { return(false); } }