Class DefaultRetentionPolicyPermissionManager
- java.lang.Object
-
- com.atlassian.confluence.impl.retention.manager.DefaultRetentionPolicyPermissionManager
-
- All Implemented Interfaces:
RetentionPolicyPermissionManager
public class DefaultRetentionPolicyPermissionManager extends Object implements RetentionPolicyPermissionManager
Enforce permission model for retention policies as described here. There are 3 underlying principles: 1. Respect that of Confluence: Confluence sysadmin to access (read + write) global policy and space admins to access (read/read + write) their spaces policies. 2. Space admins can read global policy. 3. Space policies (aka exemptions) override global policy for objects within respective spaces. But sysadmin has a final say on whether space admins can change their spaces policies.- Since:
- 7.14.0
-
-
Constructor Summary
Constructors Constructor Description DefaultRetentionPolicyPermissionManager(PermissionManager permissionManager, GlobalRetentionPolicyManager globalRetentionPolicyManager, SpaceRetentionPolicyManager spaceRetentionPolicyManager, SpaceManagerInternal spaceManagerInternal)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canEditGlobalPolicy(@Nullable ConfluenceUser user)
boolean
canEditSpacePolicy(@Nullable ConfluenceUser user, Space space)
boolean
canViewGlobalPolicy(@Nullable ConfluenceUser user)
boolean
canViewSpacePolicy(@Nullable ConfluenceUser user, Space space)
-
-
-
Constructor Detail
-
DefaultRetentionPolicyPermissionManager
public DefaultRetentionPolicyPermissionManager(PermissionManager permissionManager, GlobalRetentionPolicyManager globalRetentionPolicyManager, SpaceRetentionPolicyManager spaceRetentionPolicyManager, SpaceManagerInternal spaceManagerInternal)
-
-
Method Detail
-
canViewGlobalPolicy
public boolean canViewGlobalPolicy(@Nullable ConfluenceUser user)
- Specified by:
canViewGlobalPolicy
in interfaceRetentionPolicyPermissionManager
- Parameters:
user
- a user to be checked, can be null in case of anonymous access- Returns:
- true if specified user has permission to view global retention policy
-
canEditGlobalPolicy
public boolean canEditGlobalPolicy(@Nullable ConfluenceUser user)
- Specified by:
canEditGlobalPolicy
in interfaceRetentionPolicyPermissionManager
- Parameters:
user
- a user to be checked, can be null in case of anonymous access- Returns:
- true if specified user has permission to edit global retention policy
-
canViewSpacePolicy
public boolean canViewSpacePolicy(@Nullable ConfluenceUser user, Space space)
- Specified by:
canViewSpacePolicy
in interfaceRetentionPolicyPermissionManager
- Parameters:
user
- a user to be checked, can be null in case of anonymous accessspace
- a space to be checked- Returns:
- true if specified user has permission to view retention policy for specified space
-
canEditSpacePolicy
public boolean canEditSpacePolicy(@Nullable ConfluenceUser user, Space space)
- Specified by:
canEditSpacePolicy
in interfaceRetentionPolicyPermissionManager
- Parameters:
user
- a user to be checked, can be null in case of anonymous accessspace
- a space to be checked- Returns:
- true if specified user has permission to edit retention policy for specified space
-
-