Package com.atlassian.confluence.core
Class DefaultInheritedContentPermissionManager
- java.lang.Object
-
- com.atlassian.confluence.core.DefaultInheritedContentPermissionManager
-
- All Implemented Interfaces:
InheritedContentPermissionManager
public class DefaultInheritedContentPermissionManager extends Object implements InheritedContentPermissionManager
-
-
Constructor Summary
Constructors Constructor Description DefaultInheritedContentPermissionManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancannotHaveInheritedPermissions(ContentEntityObject contentEntityObject)Check (for speed) whether we should even bother to query for possible inherited permissions.List<ContentPermissionSet>getInheritedContentPermissionSets(ContentEntityObject contentEntityObject)List<ContentPermissionSet>getInheritedContentPermissionSetsIncludeEdit(ContentEntityObject contentEntityObject)voidsetContentPermissionSetDao(ContentPermissionSetDao contentPermissionSetDao)
-
-
-
Method Detail
-
getInheritedContentPermissionSets
public List<ContentPermissionSet> getInheritedContentPermissionSets(ContentEntityObject contentEntityObject)
- Specified by:
getInheritedContentPermissionSetsin interfaceInheritedContentPermissionManager- Returns:
- a list of
ContentPermissionSets of typeContentPermission.VIEW_PERMISSIONof all ancestors of contentEntityObject
-
getInheritedContentPermissionSetsIncludeEdit
public List<ContentPermissionSet> getInheritedContentPermissionSetsIncludeEdit(ContentEntityObject contentEntityObject)
- Specified by:
getInheritedContentPermissionSetsIncludeEditin interfaceInheritedContentPermissionManager- Parameters:
contentEntityObject- content to get inherited permissions for- Returns:
- list of all permissions on the given content, including permissions of type
ContentPermission.EDIT_PERMISSION
-
cannotHaveInheritedPermissions
protected boolean cannotHaveInheritedPermissions(ContentEntityObject contentEntityObject)
Check (for speed) whether we should even bother to query for possible inherited permissions.At the moment this simply checks if the CEO is a page AND has a parent - could be optimised further in the future.
- Returns:
- TRUE if this object cannot have inherited permissions, FALSE is the object could have inherited permissions
-
setContentPermissionSetDao
public void setContentPermissionSetDao(ContentPermissionSetDao contentPermissionSetDao)
-
-