예제 #1
0
        public static void EnsureIsAuthorized(
            string articleSlugParamName,
            ArticleAccessType accessType,
            HttpControllerContext controllerContext,
            IDictionary<string, object> actionArguments)
        {
            string slugValue = GetSlugValue(articleSlugParamName, actionArguments);

            var repository = controllerContext.GetRepository();

            EnsureIsAuthorizedInternal(slugValue, repository, accessType, controllerContext.RequestContext.Principal);
        }