Class ContentPermissionsPublishBranchHandler
The user must have access to all descendant nodes of the content item in order to continue.
Inheritance
System.Object
Microsoft.AspNetCore.Authorization.AuthorizationHandler<ContentPermissionsPublishBranchRequirement, IContent>
Namespace: Umbraco.Cms.Web.BackOffice.Authorization
Assembly: Umbraco.Web.BackOffice.dll
Syntax
public class ContentPermissionsPublishBranchHandler : MustSatisfyRequirementAuthorizationHandler<ContentPermissionsPublishBranchRequirement, IContent>, IAuthorizationHandler
Constructors
View SourceContentPermissionsPublishBranchHandler(IEntityService, ContentPermissions, IBackOfficeSecurityAccessor)
Initializes a new instance of the ContentPermissionsPublishBranchHandler class.
Declaration
public ContentPermissionsPublishBranchHandler(IEntityService entityService, ContentPermissions contentPermissions, IBackOfficeSecurityAccessor backOfficeSecurityAccessor)
Parameters
Type | Name | Description |
---|---|---|
IEntityService | entityService | Service for entity operations. |
ContentPermissions | contentPermissions | per for user content authorization checks. |
IBackOfficeSecurityAccessor | backOfficeSecurityAccessor | Accessor for back-office security. |
Methods
View SourceIsAuthorized(AuthorizationHandlerContext, ContentPermissionsPublishBranchRequirement, IContent)
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, ContentPermissionsPublishBranchRequirement requirement, IContent resource)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext | context | The authorization context. |
ContentPermissionsPublishBranchRequirement | requirement | |
IContent | resource |
Returns
Type | Description |
---|---|
Task<System.Boolean> | True if request is authorized, false if not. |