| java.lang.Object |
| ↳ |
com.atlassian.confluence.security.SpacePermissionCheckDispatcherCoordinator |
Class Overview
Space permission manager wrapper that updates the permission check dispatcher cache on operations that add or remove permissions.
Summary
| Public Methods |
|
void
|
createInitialSpacePermissions(Space space)
|
|
void
|
fixPermissions()
|
|
void
|
flushCaches()
|
|
List
|
getAllPermissionsForGroup(String group)
|
|
List
|
getGlobalPermissions()
|
|
List
|
getGlobalPermissions(String permissionType)
|
|
Map
|
getGroupsForPermissionType(String permissionType, Space space)
|
|
Collection
|
getGroupsWithPermissions(Space space)
Returns all groups wich have permissions in a space or on a global level.
|
|
Map
|
getUsersForPermissionType(String permissionType, Space space)
|
|
Collection
|
getUsersWithPermissions(Space space)
Returns a collection of user objects with VIEWSPACE_PERMISSION in the space.
|
|
boolean
|
groupHasPermission(String permissionType, Space space, String group)
Checks whether the given group has the given permission
If a null space is specified, this method looks up matching global permissions,
otherwise space's permissions list is queried to see if the permission matches.
|
|
boolean
|
hasPermission(String permissionType, Space space, User remoteUser)
Determines if remoteUser has the given permission in space
|
|
boolean
|
hasPermission(List permissionTypes, Space space, User remoteUser)
Determines if remoteUser has the given permissions in space
If remoteUser lacks any of the given permissions, false is returned.
|
|
boolean
|
hasPermissionForSpace(User user, List permissionTypes, Space space)
|
|
boolean
|
permissionExists(SpacePermission permission)
Check whether the given SpacePermission exists.
|
|
void
|
removeAllPermissions(Space space)
Removes all permissions belonging to space
|
|
void
|
removeAllPermissionsForGroup(String group)
|
|
void
|
removeAllUserPermissions(String username)
|
|
void
|
removePermission(SpacePermission permission)
|
|
void
|
savePermission(SpacePermission permission)
Saves the permission.
|
|
void
|
setPermissionCheckDispatcherResultCache(PermissionCheckDispatcherResultCache permissionCheckDispatcherResultCache)
|
|
void
|
setSpacePermissionManager(SpacePermissionManager spacePermissionManager)
|
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
From interface
com.atlassian.confluence.security.SpacePermissionManager
|
abstract
void
|
createInitialSpacePermissions(Space space)
|
|
abstract
void
|
fixPermissions()
|
|
abstract
void
|
flushCaches()
|
|
abstract
List<SpacePermission>
|
getAllPermissionsForGroup(String group)
|
|
abstract
List<SpacePermission>
|
getGlobalPermissions()
|
|
abstract
List<SpacePermission>
|
getGlobalPermissions(String permissionType)
|
|
abstract
Map
|
getGroupsForPermissionType(String permissionType, Space space)
|
|
abstract
Collection
|
getGroupsWithPermissions(Space space)
Returns all groups wich have permissions in a space or on a global level.
|
|
abstract
Map
|
getUsersForPermissionType(String permissionType, Space space)
|
|
abstract
Collection
|
getUsersWithPermissions(Space space)
Returns a collection of user objects with VIEWSPACE_PERMISSION in the space.
|
|
abstract
boolean
|
groupHasPermission(String permissionType, Space space, String group)
Checks whether the given group has the given permission
If a null space is specified, this method looks up matching global permissions,
otherwise space's permissions list is queried to see if the permission matches.
|
|
abstract
boolean
|
hasPermission(String permissionType, Space space, User remoteUser)
Determines if remoteUser has the given permission in space
|
|
abstract
boolean
|
hasPermission(List permissionTypes, Space space, User remoteUser)
Determines if remoteUser has the given permissions in space
If remoteUser lacks any of the given permissions, false is returned.
|
|
abstract
boolean
|
hasPermissionForSpace(User user, List permissionTypes, Space space)
|
|
abstract
boolean
|
permissionExists(SpacePermission permission)
Check whether the given SpacePermission exists.
|
|
abstract
void
|
removeAllPermissions(Space space)
Removes all permissions belonging to space
|
|
abstract
void
|
removeAllPermissionsForGroup(String group)
|
|
abstract
void
|
removeAllUserPermissions(String username)
|
|
abstract
void
|
removePermission(SpacePermission permission)
|
|
abstract
void
|
savePermission(SpacePermission permission)
Saves the permission.
|
|
Public Constructors
public
SpacePermissionCheckDispatcherCoordinator
()
Public Methods
public
void
createInitialSpacePermissions
(Space space)
public
void
fixPermissions
()
public
void
flushCaches
()
public
List
getAllPermissionsForGroup
(String group)
public
List
getGlobalPermissions
()
public
List
getGlobalPermissions
(String permissionType)
public
Map
getGroupsForPermissionType
(String permissionType, Space space)
public
Collection
getGroupsWithPermissions
(Space space)
Returns all groups wich have permissions in a space or on a global level.
If space is null, permissions on the global level will be checked.
Parameters
| space
| - space to query, if null global permissions returned |
Returns
- Collection of groups with permissions
public
Map
getUsersForPermissionType
(String permissionType, Space space)
public
Collection
getUsersWithPermissions
(Space space)
Returns a collection of user objects with VIEWSPACE_PERMISSION in the space.
If no space is provided A list of users with USE_CONFLUENCE_PERMISSION will be returned
Parameters
| space
| - space to query, if null global permissions returned |
Returns
- Collection of User objects
public
boolean
groupHasPermission
(String permissionType, Space space, String group)
Checks whether the given group has the given permission
If a null space is specified, this method looks up matching global permissions,
otherwise space's permissions list is queried to see if the permission matches.
Similarly, if permissionType is not a space permission, a matching global permission is looked up.
Parameters
| permissionType
| The permission type to look up |
| space
| The space the permission applies to (can be null for global permissions) |
| group
| The group to look up the permission for |
Returns
- true if the group has the required permission, false otherwise
public
boolean
hasPermission
(String permissionType, Space space, User remoteUser)
Determines if remoteUser has the given permission in space
Parameters
| permissionType
| The permission type to look up |
| space
| The space the permission applies to (can be null for global permissions) |
| remoteUser
| The user to look up (can be null for the anonymous user) |
Returns
- true if remoteUser has the permission, false otherwise
public
boolean
hasPermission
(List permissionTypes, Space space, User remoteUser)
Determines if remoteUser has the given permissions in space
If remoteUser lacks any of the given permissions, false is returned.
Parameters
| permissionTypes
| A List of permission types (see SpacePermission) to check |
| space
| The space the permissions apply to |
| remoteUser
| The user to look up |
Returns
- true if remoteUser has the permission, false otherwise
public
boolean
hasPermissionForSpace
(User user, List permissionTypes, Space space)
public
boolean
permissionExists
(SpacePermission permission)
Check whether the given SpacePermission exists. Checks by attribute equality rather than by id.
Parameters
| permission
| the permission to look for. |
Returns
- true if the permission is recognised by the manager as existing.
public
void
removeAllPermissions
(Space space)
Removes all permissions belonging to space
Parameters
| space
| The space to remove the permissions for
|
public
void
removeAllPermissionsForGroup
(String group)
public
void
removeAllUserPermissions
(String username)