@Role
@Unstable
public interface ContextualAuthorizationManager
| Modifier and Type | Method and Description |
|---|---|
void |
checkAccess(Right right)
Check if access identified by
right on the current entity is allowed in the current context. |
void |
checkAccess(Right right,
EntityReference entityReference)
Check if access identified by
right on the given entity is allowed in the current context. |
boolean |
hasAccess(Right right)
Verifies if access identified by
right on the current entity would be allowed in the current context. |
boolean |
hasAccess(Right right,
EntityReference entityReference)
Verifies if access identified by
right on the given entity would be allowed in the current context. |
void checkAccess(Right right) throws AccessDeniedException
right on the current entity is allowed in the current context.
The context includes information like the authenticated user, the current macro being executed, the rendering
context restriction, the dropping of rights by macro, etc...
This function should be used at security checkpoint.right - the right needed for execution of the actionAccessDeniedException - if the action should be denied, which may also happen when an error occursboolean hasAccess(Right right)
right on the current entity would be allowed in the current context.
The context includes information like the authenticated user, the current macro being executed, the rendering
context restriction, the dropping of rights by macro, etc...
This function should be used for interface matters, use checkAccess(org.xwiki.security.authorization.Right) at security checkpoints.right - the right to check .true if the user has the specified right on the entity, false otherwisevoid checkAccess(Right right, EntityReference entityReference) throws AccessDeniedException
right on the given entity is allowed in the current context.
The context includes information like the authenticated user, the current macro being executed, the rendering
context restriction, the dropping of rights by macro, etc...
This function should be used at security checkpoint.right - the right needed for execution of the actionentityReference - the entity on which to check the rightAccessDeniedException - if the action should be denied, which may also happen when an error occursboolean hasAccess(Right right, EntityReference entityReference)
right on the given entity would be allowed in the current context.
The context includes information like the authenticated user, the current macro being executed, the rendering
context restriction, the dropping of rights by macro, etc...
This function should be used for interface matters, use checkAccess(org.xwiki.security.authorization.Right) at security checkpoints.right - the right to check .entityReference - the entity on which to check the righttrue if the user has the specified right on the entity, false otherwiseCopyright © 2004–2014 XWiki. All rights reserved.