protected override bool AuthorizeCore(HttpContextBase httpContext) { string currentUserlogged = WindowsUser.Username; try { return(_iFUser.IsMethodAccessible(currentUserlogged, AllowedRoles.ToList())); } catch (Exception ex) { return(false); } }
public static bool HasUserRoles(string[] userRoles) { _iFUser = new FUser(); return(_iFUser.IsMethodAccessible(Username, userRoles.ToList()));; }