public bool? OverrideAuthorize(CommonJobsAuthorizeAttribute authorizeAttribute, System.Web.HttpContextBase httpContext) { if (httpContext.User != null && httpContext.User.Identity != null && httpContext.User.Identity.AuthenticationType == "Forms") return SessionRolesAuthorizationBehavior.OverrideAuthorize(authorizeAttribute, httpContext); else return PrefixAuthorizationBehavior.OverrideAuthorize(authorizeAttribute, httpContext); }
public bool?OverrideAuthorize(CommonJobsAuthorizeAttribute authorizeAttribute, System.Web.HttpContextBase httpContext) { if (httpContext.User != null && httpContext.User.Identity != null && httpContext.User.Identity.AuthenticationType == "Forms") { return(SessionRolesAuthorizationBehavior.OverrideAuthorize(authorizeAttribute, httpContext)); } else { return(PrefixAuthorizationBehavior.OverrideAuthorize(authorizeAttribute, httpContext)); } }
public bool? OverrideAuthorize(CommonJobsAuthorizeAttribute authorizeAttribute, System.Web.HttpContextBase httpContext) { if (httpContext.User == null || httpContext.User.Identity == null || !httpContext.User.Identity.IsAuthenticated) return false; if (String.IsNullOrEmpty(authorizeAttribute.Roles)) return true; var sessionRoles = (string[])httpContext.Session[SessionRolesKey] ?? new string[] { }; var required = authorizeAttribute.Roles.ToRoleList(); return sessionRoles.Intersect(required).Any(); }
bool? IAuthorizationBehavior.OverrideAuthorize(CommonJobsAuthorizeAttribute authorizeAttribute, System.Web.HttpContextBase httpContext) { //No setear la configuración representa un usuario no autenticado if (ForcedGroups == null) return false; if (String.IsNullOrEmpty(authorizeAttribute.Roles)) return true; var required = authorizeAttribute.Roles.ToRoleList(); return ForcedGroups.Intersect(required).Any(); }
bool?IAuthorizationBehavior.OverrideAuthorize(CommonJobsAuthorizeAttribute authorizeAttribute, System.Web.HttpContextBase httpContext) { //No setear la configuración representa un usuario no autenticado if (ForcedGroups == null) { return(false); } if (String.IsNullOrEmpty(authorizeAttribute.Roles)) { return(true); } var required = authorizeAttribute.Roles.ToRoleList(); return(ForcedGroups.Intersect(required).Any()); }
public bool?OverrideAuthorize(CommonJobsAuthorizeAttribute authorizeAttribute, System.Web.HttpContextBase httpContext) { if (httpContext.User == null || httpContext.User.Identity == null || !httpContext.User.Identity.IsAuthenticated) { return(false); } if (String.IsNullOrEmpty(authorizeAttribute.Roles)) { return(true); } var sessionRoles = (string[])httpContext.Session[SessionRolesKey] ?? new string[] { }; var required = authorizeAttribute.Roles.ToRoleList(); return(sessionRoles.Intersect(required).Any()); }
bool?IAuthorizationBehavior.OverrideAuthorize(CommonJobsAuthorizeAttribute authorizeAttribute, System.Web.HttpContextBase httpContext) { return(null); }
bool? IAuthorizationBehavior.OverrideAuthorize(CommonJobsAuthorizeAttribute authorizeAttribute, System.Web.HttpContextBase httpContext) { return null; }