private bool IsInRole(UserContext user, params UserRole[] role) { if (user != null) { return(user.IsInRole(Logins.GetRoleName(role))); } else { for (int i = 0; i < role.Length; i++) { if (role[i] == this._role) { return(true); } } } return(false); }