protected override bool AuthorizeCore(HttpContextBase httpContext)
        {
            string currentUserlogged = WindowsUser.Username;

            try
            {
                return(_iFUser.IsMethodAccessible(currentUserlogged, AllowedRoles.ToList()));
            }
            catch (Exception ex)
            {
                return(false);
            }
        }
Exemplo n.º 2
0
 public static bool HasUserRoles(string[] userRoles)
 {
     _iFUser = new FUser();
     return(_iFUser.IsMethodAccessible(Username, userRoles.ToList()));;
 }