|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.confluence.security.SpacePermissionCheckDispatcherCoordinator
public class SpacePermissionCheckDispatcherCoordinator
Space permission manager wrapper that updates the permission check dispatcher cache on operations that add or remove permissions.
Constructor Summary | |
---|---|
SpacePermissionCheckDispatcherCoordinator()
|
Method Summary | |
---|---|
void |
createInitialSpacePermissions(Space space)
Creates all the initial permissions (in this list SpacePermission.GENERIC_SPACE_PERMISSIONS ) in the specified 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(List permissionTypes,
Space space,
com.atlassian.user.User remoteUser)
Determines if remoteUser has the given permissions in space If remoteUser lacks any of the given permissions, false is returned. |
boolean |
hasPermission(String permissionType,
Space space,
com.atlassian.user.User remoteUser)
Determines if remoteUser has the given permission in space |
boolean |
hasPermissionForSpace(com.atlassian.user.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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpacePermissionCheckDispatcherCoordinator()
Method Detail |
---|
public void savePermission(SpacePermission permission)
SpacePermissionManager
savePermission
in interface SpacePermissionManager
public void removeAllPermissions(Space space)
SpacePermissionManager
removeAllPermissions
in interface SpacePermissionManager
space
- The space to remove the permissions forpublic void removePermission(SpacePermission permission)
removePermission
in interface SpacePermissionManager
public boolean hasPermission(String permissionType, Space space, com.atlassian.user.User remoteUser)
SpacePermissionManager
hasPermission
in interface SpacePermissionManager
permissionType
- The permission type to look upspace
- 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)
public boolean hasPermission(List permissionTypes, Space space, com.atlassian.user.User remoteUser)
SpacePermissionManager
hasPermission
in interface SpacePermissionManager
permissionTypes
- A List of permission types (see SpacePermission) to checkspace
- The space the permissions apply toremoteUser
- The user to look up
public void removeAllUserPermissions(String username)
removeAllUserPermissions
in interface SpacePermissionManager
public void removeAllPermissionsForGroup(String group)
removeAllPermissionsForGroup
in interface SpacePermissionManager
public List getAllPermissionsForGroup(String group)
getAllPermissionsForGroup
in interface SpacePermissionManager
public List getGlobalPermissions()
getGlobalPermissions
in interface SpacePermissionManager
public List getGlobalPermissions(String permissionType)
getGlobalPermissions
in interface SpacePermissionManager
public void fixPermissions()
fixPermissions
in interface SpacePermissionManager
public void flushCaches()
flushCaches
in interface SpacePermissionManager
public boolean groupHasPermission(String permissionType, Space space, String group)
SpacePermissionManager
groupHasPermission
in interface SpacePermissionManager
permissionType
- The permission type to look upspace
- The space the permission applies to (can be null for global permissions)group
- The group to look up the permission for
public void createInitialSpacePermissions(Space space)
SpacePermissionManager
SpacePermission.GENERIC_SPACE_PERMISSIONS
) in the specified space.
createInitialSpacePermissions
in interface SpacePermissionManager
public boolean hasPermissionForSpace(com.atlassian.user.User user, List permissionTypes, Space space)
hasPermissionForSpace
in interface SpacePermissionManager
public Collection getGroupsWithPermissions(Space space)
SpacePermissionManager
getGroupsWithPermissions
in interface SpacePermissionManager
space
- - space to query, if null global permissions returned
public Map getGroupsForPermissionType(String permissionType, Space space)
getGroupsForPermissionType
in interface SpacePermissionManager
public Collection getUsersWithPermissions(Space space)
SpacePermissionManager
getUsersWithPermissions
in interface SpacePermissionManager
space
- - space to query, if null global permissions returned
public Map getUsersForPermissionType(String permissionType, Space space)
getUsersForPermissionType
in interface SpacePermissionManager
public boolean permissionExists(SpacePermission permission)
SpacePermissionManager
permissionExists
in interface SpacePermissionManager
permission
- the permission to look for.
public void setPermissionCheckDispatcherResultCache(PermissionCheckDispatcherResultCache permissionCheckDispatcherResultCache)
public void setSpacePermissionManager(SpacePermissionManager spacePermissionManager)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |