private bool CheckRoles(UserSessionObject currentUser) { bool result = false; result = currentUser.Roles.Any(x => RoleList.Any(y => y.Equals(x))); return(result); }
public bool UserInRole(string roleName) { if (RoleList != null) { return(RoleList.Any(info => info.Name.Equals(roleName, StringComparison.OrdinalIgnoreCase))); } return(false); }