Exemple #1
0
        protected override bool AuthorizeCore(HttpContextBase httpContext)
        {
            if (!_authorize)
            {
                return(true);
            }

            try
            {
                bool basicAuthed = base.AuthorizeCore(httpContext);
                if (basicAuthed)
                {
                    if (DomainAuthHelper.IsUserContextDomainAuthorized(httpContext))
                    {
                        return(DomainAuthHelper.UserHasDeviceAccess(httpContext));
                    }
                }
            }
            catch (Exception e)
            {
                return(false);
            }
            return(false);
        }