public bool IsAuthorized(User user) { foreach (var role in Roles) { if (role.IsUserInRole(user)) { return (true); } } return (false); }
public abstract bool IsAuthorized(User user);
public bool IsUserInRole(User user) { return (_users.Contains(user.Identity.Name)); }