Class TargetToLatestVersionDecorator
- java.lang.Object
-
- com.atlassian.confluence.security.delegate.TargetToLatestVersionDecorator
-
- All Implemented Interfaces:
PermissionDelegate
public class TargetToLatestVersionDecorator extends Object implements PermissionDelegate
Note that if this is used to verify permissions for drafts the delegate will verify permissions on the version the draft points to.This should be ok as the default behavior should be to always modify permissions directly on the last saved version of a
ContentEntityObjectregardless of they being also kept in sync on the draft.- See Also:
ContentEntityObject.DRAFT
-
-
Constructor Summary
Constructors Constructor Description TargetToLatestVersionDecorator(PermissionDelegate delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanAdminister(ConfluenceUser user, Object target)booleancanCreate(ConfluenceUser user, Object container)booleancanCreateInTarget(ConfluenceUser user, Class typeToCreate)booleancanEdit(ConfluenceUser user, Object target)booleancanExport(ConfluenceUser user, Object target)booleancanMove(ConfluenceUser user, Object source, Object target, String movePoint)booleancanRemove(ConfluenceUser user, Object target)booleancanRemoveHierarchy(ConfluenceUser user, Object target)booleancanSetPermissions(ConfluenceUser user, Object target)booleancanView(ConfluenceUser user)booleancanView(ConfluenceUser user, Object target)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.security.PermissionDelegate
canAdminister, canCreate, canCreateInTarget, canEdit, canExport, canMove, canRemove, canRemoveHierarchy, canSetPermissions, canView, canView
-
-
-
-
Constructor Detail
-
TargetToLatestVersionDecorator
public TargetToLatestVersionDecorator(PermissionDelegate delegate)
-
-
Method Detail
-
canView
public boolean canView(ConfluenceUser user, Object target)
- Specified by:
canViewin interfacePermissionDelegate- Returns:
- true if user can view the specified target.
-
canView
public boolean canView(ConfluenceUser user)
- Specified by:
canViewin interfacePermissionDelegate- Returns:
- true if the user can view all instances of targets handled by this permission delegate
-
canEdit
public boolean canEdit(ConfluenceUser user, Object target)
- Specified by:
canEditin interfacePermissionDelegate
-
canSetPermissions
public boolean canSetPermissions(ConfluenceUser user, Object target)
- Specified by:
canSetPermissionsin interfacePermissionDelegate
-
canRemove
public boolean canRemove(ConfluenceUser user, Object target)
- Specified by:
canRemovein interfacePermissionDelegate
-
canRemoveHierarchy
public boolean canRemoveHierarchy(ConfluenceUser user, Object target)
- Specified by:
canRemoveHierarchyin interfacePermissionDelegate
-
canMove
public boolean canMove(ConfluenceUser user, Object source, Object target, String movePoint)
- Specified by:
canMovein interfacePermissionDelegate
-
canExport
public boolean canExport(ConfluenceUser user, Object target)
- Specified by:
canExportin interfacePermissionDelegate
-
canAdminister
public boolean canAdminister(ConfluenceUser user, Object target)
- Specified by:
canAdministerin interfacePermissionDelegate
-
canCreate
public boolean canCreate(ConfluenceUser user, Object container)
- Specified by:
canCreatein interfacePermissionDelegate- Returns:
- true if the specified user can create new instances of the target type in the specified container.
-
canCreateInTarget
public boolean canCreateInTarget(ConfluenceUser user, Class typeToCreate)
- Specified by:
canCreateInTargetin interfacePermissionDelegate- Parameters:
user- the user performing the createtypeToCreate- the class of the entity to create- Returns:
- true if the specified user can create new instances of the specified typeToCreate within instances of target handled by this PermissionDelegate.
-
-