Class TreeHandler
Ensures that the current user has access to the section for which the specified tree(s) belongs
Namespace: Umbraco.Cms.Web.BackOffice.Authorization
Assembly: Umbraco.Web.BackOffice.dll
Syntax
public class TreeHandler : MustSatisfyRequirementAuthorizationHandler<TreeRequirement>, IAuthorizationHandler
Remarks
This would allow a tree to be moved between sections. The user only needs access to one of the trees specified, not all of the trees.
Constructors
View SourceTreeHandler(ITreeService, IBackOfficeSecurityAccessor)
Initializes a new instance of the Tree
Declaration
public TreeHandler(ITreeService treeService, IBackOfficeSecurityAccessor backOfficeSecurityAccessor)
Parameters
Type | Name | Description |
---|---|---|
ITree |
treeService | Service for section tree operations. |
IBack |
backOfficeSecurityAccessor | Accessor for back-office security. |
Methods
View SourceIsAuthorized(AuthorizationHandlerContext, TreeRequirement)
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, TreeRequirement requirement)
Parameters
Type | Name | Description |
---|---|---|
Microsoft. |
context | The authorization context. |
Tree |
requirement |
Returns
Type | Description |
---|---|
Task<System. |
True if request is authorized, false if not. |