Beispiel #1
0
        public static void EnsureIsAuthorized(
            string articleIdParamName,
            ArticleAccessType accessType,
            HttpRequestContext requestContext,
            IDictionary <string, object> actionArguments)
        {
            string slugValue = GetSlugValue(articleIdParamName, actionArguments);

            var repository = RepositoryRequestInstance.Get(requestContext);

            EnsureIsAuthorizedInternal(slugValue, repository, accessType, requestContext.Principal);
        }
Beispiel #2
0
        public static void EnsureIsAuthorized(
            string articleIdParamName,
            ArticleAccessType accessType,
            RequestContext requestContext,
            IDictionary <string, object> actionArguments)
        {
            string slugValue = GetSlugValue(articleIdParamName, actionArguments);

            var documentStore = DocumentStoreAppInstance.Get(requestContext.HttpContext.Application);
            var repository    = RepositoryRequestInstance.Get(requestContext, documentStore);

            EnsureIsAuthorizedInternal(slugValue, repository, accessType, requestContext.HttpContext.User);
        }