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
ContentEntityObject
regardless 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 boolean
canAdminister(com.atlassian.user.User user, Object target)
boolean
canCreate(com.atlassian.user.User user, Object container)
boolean
canCreateInTarget(com.atlassian.user.User user, Class typeToCreate)
boolean
canEdit(com.atlassian.user.User user, Object target)
boolean
canExport(com.atlassian.user.User user, Object target)
boolean
canMove(com.atlassian.user.User user, Object source, Object target, String movePoint)
boolean
canRemove(com.atlassian.user.User user, Object target)
boolean
canRemoveHierarchy(com.atlassian.user.User user, Object target)
boolean
canSetPermissions(com.atlassian.user.User user, Object target)
boolean
canView(com.atlassian.user.User user)
boolean
canView(com.atlassian.user.User user, Object target)
-
-
-
Constructor Detail
-
TargetToLatestVersionDecorator
public TargetToLatestVersionDecorator(PermissionDelegate delegate)
-
-
Method Detail
-
canView
public boolean canView(com.atlassian.user.User user, Object target)
- Specified by:
canView
in interfacePermissionDelegate
- Returns:
- true if user can view the specified target.
-
canView
public boolean canView(com.atlassian.user.User user)
- Specified by:
canView
in interfacePermissionDelegate
- Returns:
- true if the user can view all instances of targets handled by this permission delegate
-
canEdit
public boolean canEdit(com.atlassian.user.User user, Object target)
- Specified by:
canEdit
in interfacePermissionDelegate
-
canSetPermissions
public boolean canSetPermissions(com.atlassian.user.User user, Object target)
- Specified by:
canSetPermissions
in interfacePermissionDelegate
-
canRemove
public boolean canRemove(com.atlassian.user.User user, Object target)
- Specified by:
canRemove
in interfacePermissionDelegate
-
canRemoveHierarchy
public boolean canRemoveHierarchy(com.atlassian.user.User user, Object target)
- Specified by:
canRemoveHierarchy
in interfacePermissionDelegate
-
canMove
public boolean canMove(com.atlassian.user.User user, Object source, Object target, String movePoint)
- Specified by:
canMove
in interfacePermissionDelegate
-
canExport
public boolean canExport(com.atlassian.user.User user, Object target)
- Specified by:
canExport
in interfacePermissionDelegate
-
canAdminister
public boolean canAdminister(com.atlassian.user.User user, Object target)
- Specified by:
canAdminister
in interfacePermissionDelegate
-
canCreate
public boolean canCreate(com.atlassian.user.User user, Object container)
- Specified by:
canCreate
in interfacePermissionDelegate
- Returns:
- true if the specified user can create new instances of the target type in the specified container.
-
canCreateInTarget
public boolean canCreateInTarget(com.atlassian.user.User user, Class typeToCreate)
- Specified by:
canCreateInTarget
in 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.
-
-