Class PublicAccessRequestHandler
Inheritance
System.Object
Namespace: Umbraco.Cms.Web.Website.Routing
Assembly: Umbraco.Web.Website.dll
Syntax
public class PublicAccessRequestHandler : IPublicAccessRequestHandler
Constructors
View SourcePublicAccessRequestHandler(ILogger<PublicAccessRequestHandler>, IPublicAccessService, IPublicAccessChecker, IUmbracoContextAccessor, IUmbracoRouteValuesFactory, IPublishedRouter)
Declaration
public PublicAccessRequestHandler(ILogger<PublicAccessRequestHandler> logger, IPublicAccessService publicAccessService, IPublicAccessChecker publicAccessChecker, IUmbracoContextAccessor umbracoContextAccessor, IUmbracoRouteValuesFactory umbracoRouteValuesFactory, IPublishedRouter publishedRouter)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.Logging.ILogger<PublicAccessRequestHandler> | logger | |
IPublicAccessService | publicAccessService | |
IPublicAccessChecker | publicAccessChecker | |
IUmbracoContextAccessor | umbracoContextAccessor | |
IUmbracoRouteValuesFactory | umbracoRouteValuesFactory | |
IPublishedRouter | publishedRouter |
Methods
View SourceRewriteForPublishedContentAccessAsync(HttpContext, UmbracoRouteValues)
Ensures that access to current node is permitted.
Declaration
public async Task<UmbracoRouteValues> RewriteForPublishedContentAccessAsync(HttpContext httpContext, UmbracoRouteValues routeValues)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.HttpContext | httpContext | |
UmbracoRouteValues | routeValues | The current route values |
Returns
Type | Description |
---|---|
Task<UmbracoRouteValues> | Updated route values if public access changes the rendered content, else the original route values. |
Remarks
Redirecting to a different site root and/or culture will not pick the new site root nor the new culture.