Class AbstractPermissionsDelegate<TARGET>
java.lang.Object
com.atlassian.confluence.security.delegate.AbstractPermissionsDelegate<TARGET>
- All Implemented Interfaces:
PermissionDelegate<TARGET>
- Direct Known Subclasses:
AttachmentPermissionsDelegate
,BlogPostPermissionsDelegate
,CommentPermissionsDelegate
,DraftPermissionsDelegate
,LabellingPermissionsDelegate
,PagePermissionsDelegate
,PageTemplatePermissionsDelegate
,SpacePermissionsDelegate
public abstract class AbstractPermissionsDelegate<TARGET>
extends Object
implements PermissionDelegate<TARGET>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canCreateInTarget
(ConfluenceUser user, Class typeToCreate) boolean
canView
(ConfluenceUser user) protected abstract Space
getSpaceFrom
(Object target) protected boolean
hasSpaceLevelPermission
(String permission, ConfluenceUser user, Object target) protected boolean
hasSpaceLevelPermission
(String permission, com.atlassian.user.User user, Object target) void
setSpacePermissionManager
(SpacePermissionManager spacePermissionManager) 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, canAdminister, canCreate, canCreate, canCreateInTarget, canEdit, canEdit, canExport, canExport, canMove, canMove, canRemove, canRemove, canRemoveHierarchy, canRemoveHierarchy, canSetPermissions, canSetPermissions, canView, canView, canView
-
Field Details
-
spacePermissionManager
-
-
Constructor Details
-
AbstractPermissionsDelegate
public AbstractPermissionsDelegate()
-
-
Method Details
-
setSpacePermissionManager
-
hasSpaceLevelPermission
-
hasSpaceLevelPermission
-
canView
- Specified by:
canView
in interfacePermissionDelegate<TARGET>
- Returns:
- true if the user can view all instances of targets handled by this permission delegate
-
canCreateInTarget
- Specified by:
canCreateInTarget
in interfacePermissionDelegate<TARGET>
- 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.
-
getSpaceFrom
- Parameters:
target
- an entity object from which we want to extract a space container- Returns:
Space
container of the given target if available
-