public static Repository Get(HttpRequestContext requestContext, IDocumentStore documentStore = null) { EnsureRequestContext(requestContext); documentStore = documentStore ?? DocumentStoreAppInstance.Get(); return(GetRepository(documentStore, requestContext.Configuration.Properties, requestContext.Principal)); }
public static Repository Get(RequestContext requestContext, IDocumentStore documentStore = null) { EnsureRequestContext(requestContext); documentStore = documentStore ?? DocumentStoreAppInstance.Get(); return(GetRepository(documentStore, requestContext.HttpContext.Items, requestContext.HttpContext.User)); }
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); }