Class ContentPermissionsQueryStringHandler
Used to authorize if the user has the correct permission access to the content for the content id specified in a query string.
Inheritance
System.Object
Microsoft.AspNetCore.Authorization.AuthorizationHandler <ContentPermissionsQueryStringRequirement >
Namespace: Umbraco.Cms.Web.BackOffice.Authorization
Assembly: Umbraco.Web.BackOffice.dll
Syntax
public class ContentPermissionsQueryStringHandler : PermissionsQueryStringHandler<ContentPermissionsQueryStringRequirement>, IAuthorizationHandler
Constructors
View SourceContentPermissionsQueryStringHandler(IBackOfficeSecurityAccessor, IHttpContextAccessor, IEntityService, ContentPermissions)
Initializes a new instance of the Content
Declaration
public ContentPermissionsQueryStringHandler(IBackOfficeSecurityAccessor backOfficeSecurityAccessor, IHttpContextAccessor httpContextAccessor, IEntityService entityService, ContentPermissions contentPermissions)
Parameters
Type | Name | Description |
---|---|---|
IBack |
backOfficeSecurityAccessor | Accessor for back-office security. |
Microsoft. |
httpContextAccessor | Accessor for the HTTP context of the current request. |
IEntity |
entityService | Service for entity operations. |
Content |
contentPermissions | Helper for content authorization checks. |
Properties
View SourceKeyParsingFilterType
Declaration
protected override UmbracoObjectTypes KeyParsingFilterType { get; }
Property Value
Type | Description |
---|---|
Umbraco |
Methods
View SourceIsAuthorized(AuthorizationHandlerContext, ContentPermissionsQueryStringRequirement)
Return true if the requirement is succeeded or ignored, return false if the requirement is explicitly not met
Declaration
protected override Task<bool> IsAuthorized(AuthorizationHandlerContext context, ContentPermissionsQueryStringRequirement requirement)
Parameters
Type | Name | Description |
---|---|---|
Microsoft. |
context | The authorization context. |
Content |
requirement |
Returns
Type | Description |
---|---|
Task<System. |
True if request is authorized, false if not. |