public class ConfluenceAccessInterceptor extends AbstractAwareInterceptor
This means that access check annotations on the action method override annotations on the class, and annotations on the class override annotations on the package. If for example, annotations are found on both the class and the package, then only the class level annotations will be checked
If multiple access check annotations are present on a particular method OR class OR package, then the user will be granted access if any of those access check annotations grant them access. For example, if a method has access check annotations "@A" and "@B", then the user will have access if either "@A" or "@B" grants access to that particular user.
If no access check annotations are found, this interceptor will have no effect. This will then fall back to the
default check for SpacePermission.USE_CONFLUENCE_PERMISSION
in ConfluenceActionSupport.isPermitted()
.
Available annotations:
Modifier and Type | Class and Description |
---|---|
protected static class |
ConfluenceAccessInterceptor.AccessDecision |
Constructor and Description |
---|
ConfluenceAccessInterceptor() |
Modifier and Type | Method and Description |
---|---|
protected ConfluenceAccessInterceptor.AccessDecision |
checkAccessAnnotations(AnnotatedElement annotatedElement,
com.google.common.base.Supplier<AccessStatus> accessStatusSupplier)
Checks if the user is granted access by any annotations on the provided annotated element (method / class /
package).
|
protected List<AnnotatedElement> |
getOrderedAnnotatedElements(com.opensymphony.xwork.ActionInvocation actionInvocation)
Gets the method, class and package targets for the current action invocation, to be inspected for access check
annotations.
|
String |
intercept(com.opensymphony.xwork.ActionInvocation actionInvocation) |
destroy, getParameter, getUser, hasParameter, init
public String intercept(com.opensymphony.xwork.ActionInvocation actionInvocation) throws Exception
intercept
in interface com.opensymphony.xwork.interceptor.Interceptor
intercept
in class AbstractAwareInterceptor
Exception
protected List<AnnotatedElement> getOrderedAnnotatedElements(com.opensymphony.xwork.ActionInvocation actionInvocation)
protected ConfluenceAccessInterceptor.AccessDecision checkAccessAnnotations(AnnotatedElement annotatedElement, com.google.common.base.Supplier<AccessStatus> accessStatusSupplier)
If any access check annotations are found on the element:
if any checks grant access => GRANTED
otherwise => DENIED
If no access check annotations are found, the result will be ABSTAIN
.
Copyright © 2003–2016 Atlassian. All rights reserved.