public bool IsAuthorized(User user)
        {
            foreach (var role in Roles)
            {
                if (role.IsUserInRole(user))
                {
                    return (true);
                }
            }

            return (false);
        }
示例#2
0
 public abstract bool IsAuthorized(User user);
示例#3
0
 public bool IsUserInRole(User user)
 {
     return (_users.Contains(user.Identity.Name));
 }