|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.confluence.security.AbstractSpacePermissionManager
com.atlassian.confluence.security.DefaultSpacePermissionManager
Field Summary | |
protected static org.apache.log4j.Category |
log
|
Fields inherited from class com.atlassian.confluence.security.AbstractSpacePermissionManager |
spacePermissionDao |
Constructor Summary | |
DefaultSpacePermissionManager()
|
Method Summary | |
void |
createInitialSpacePermissions(Space space,
User creator)
|
void |
flushCaches()
|
List |
getAllPermissionsForGroup(String group)
|
List |
getGlobalPermissions()
|
List |
getGlobalPermissions(String permissionType)
|
Map |
getGroupsForPermissionType(String permissionType,
Space space)
returns a map with groupName --> Group permissionId |
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,
User user)
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,
User remoteUser)
Determines if remoteUser has the given permission in space |
protected boolean |
hasPermissionInDao(SpacePermission permission)
Determines if permission exists in the SpacePermissionDao |
void |
removeAllPermissions(Space space)
Removes all permissions belonging to space |
void |
removeAllPermissionsForGroup(String group)
|
void |
removeAllUserPermissions(String username)
Remove all permissions that directly relate to this username. |
void |
removePermission(SpacePermission permission)
|
protected void |
removePermissionFromDao(SpacePermission realPermission)
Removes the permission from the data store This may be overridden to provide caching, where applicable |
void |
savePermission(SpacePermission permission)
|
protected void |
savePermissionToDao(SpacePermission permission)
Saves the permission to the data store This may be overridden to provide caching, where applicable. |
Methods inherited from class com.atlassian.confluence.security.AbstractSpacePermissionManager |
fixPermissions, getUserAccessor, hasPermissionForSpace, setSpacePermissionDao, setUserAccessor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static org.apache.log4j.Category log
Constructor Detail |
public DefaultSpacePermissionManager()
Method Detail |
public void flushCaches()
public void savePermission(SpacePermission permission)
public void removePermission(SpacePermission permission)
public boolean hasPermission(String permissionType, Space space, User remoteUser)
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, User user)
SpacePermissionManager
permissionTypes
- A List of permission types (see SpacePermission) to checkspace
- The space the permissions apply touser
- The user to look up
public boolean groupHasPermission(String permissionType, Space space, String group)
SpacePermissionManager
group
- The group to look up the permission forspace
- The space the permission applies to (can be null for global permissions)permissionType
- The permission type to look up
public List getGlobalPermissions()
public List getGlobalPermissions(String permissionType)
public void removeAllUserPermissions(String username)
username
- the username of the user whose permissions are being removed.public void removeAllPermissionsForGroup(String group)
public List getAllPermissionsForGroup(String group)
public void removeAllPermissions(Space space)
SpacePermissionManager
space
- The space to remove the permissions forpublic void createInitialSpacePermissions(Space space, User creator)
public Collection getUsersWithPermissions(Space space)
SpacePermissionManager
space
-
public Collection getGroupsWithPermissions(Space space)
SpacePermissionManager
space
-
public Map getUsersForPermissionType(String permissionType, Space space)
public Map getGroupsForPermissionType(String permissionType, Space space)
permissionType
- protected boolean hasPermissionInDao(SpacePermission permission)
permission
- The SpacePermission object to look up
protected void savePermissionToDao(SpacePermission permission)
permission
- the SpacePermission to be savedprotected void removePermissionFromDao(SpacePermission realPermission)
realPermission
- the SpacePermission to be removed
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |