Class DefaultSetSpacePermissionChecker
java.lang.Object
com.atlassian.confluence.security.DefaultSetSpacePermissionChecker
- All Implemented Interfaces:
SetSpacePermissionChecker
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanSetPermission(ConfluenceUser user, SpacePermission spacePermission) Checks whether the specified user can set the specified space permission.voidsetBootstrapManager(BootstrapManager bootstrapManager) voidsetGroupManager(com.atlassian.user.GroupManager groupManager) voidsetI18NBeanFactory(I18NBeanFactory i18NBeanFactory) voidsetPermissionManager(PermissionManager permissionManager) voidsetUserManager(com.atlassian.user.UserManager userManager)
-
Constructor Details
-
DefaultSetSpacePermissionChecker
public DefaultSetSpacePermissionChecker()
-
-
Method Details
-
canSetPermission
Checks whether the specified user can set the specified space permission. Setting includes adding or removing the permission. This always returns true before the application is set up.- If the specified permission is a global space permission, you must be Confluence administrator to be able to set it.
- If the specified permission is a system administrator space permission, you must be system administrator to be able to set it.
- If the specified permission is a permission for space, you must be the administrator of the space to be able to set it.
- Specified by:
canSetPermissionin interfaceSetSpacePermissionChecker- Parameters:
user- the user trying to set the permissionspacePermission- the permission that is being set- Returns:
- true if the specified user has permissions to set the specified space permission, false otherwise.
- Throws:
EntityRuntimeException- if either the username or groupname declared in the specifiedSpacePermissiondoes not exist (or there was an error fetching them)
-
setPermissionManager
-
setBootstrapManager
-
setUserManager
public void setUserManager(com.atlassian.user.UserManager userManager) -
setGroupManager
public void setGroupManager(com.atlassian.user.GroupManager groupManager) -
setI18NBeanFactory
-