@Internal public class CachingSpacePermissionManager extends DefaultSpacePermissionManager
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CACHE_KEY |
spacePermissionDao
Constructor and Description |
---|
CachingSpacePermissionManager(SpacePermissionDao spacePermissionDao,
PermissionCheckExemptions permissionCheckExemptions,
SpacePermissionDefaultsStoreFactory spacePermissionDefaultsStoreFactory,
com.atlassian.cache.CacheFactory cacheFactory) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canUseConfluence(com.atlassian.user.User remoteUser,
java.lang.String permissionCheck) |
void |
flushCaches() |
protected java.util.Set<java.lang.String> |
getGroupNamesWithPermission(Space targetSpace,
java.lang.String permissionType) |
boolean |
hasPermission(java.lang.String permissionType,
Space space,
com.atlassian.user.User remoteUser)
Determines if remoteUser has the given permission in space
Unless you're writing code that is part of the permission checking implementation, or you're changing space permissions,
you should be using
PermissionManager instead. |
boolean |
isLookAheadEnabled() |
boolean |
permissionExists(SpacePermission permission)
Looks up permission in the cache instance.
|
void |
removeAllPermissions(Space space)
Removes all permissions belonging to space
|
void |
removeAllPermissionsForGroup(java.lang.String group) |
void |
removePermission(SpacePermission spacePermission)
Removes the specified permission.
|
protected void |
removePermissionFromDao(SpacePermission spacePermission)
Removes realPermission from the DAO.
|
protected void |
savePermissionToDao(SpacePermission spacePermission)
Saves permission to the DAO.
|
void |
setLookAheadEnabled(boolean lookAheadEnabled) |
createDefaultSpacePermissions, createInitialSpacePermissions, createPrivateSpacePermissions, getAllPermissionsForGroup, getAllPermissionsForUser, getGlobalPermissions, getGlobalPermissions, getGroupsForPermissionType, getGroupsWithPermissions, getUsersForPermissionType, getUsersWithPermissions, groupHasPermission, hasAllPermissions, hasPermission, removeAllUserPermissions, removeAllUserPermissions, removeGlobalPermissionForUser, removePermissions, savePermission
getDefaultGlobalPermissions, getUserAccessor, hasPermissionForSpace
public CachingSpacePermissionManager(SpacePermissionDao spacePermissionDao, PermissionCheckExemptions permissionCheckExemptions, SpacePermissionDefaultsStoreFactory spacePermissionDefaultsStoreFactory, com.atlassian.cache.CacheFactory cacheFactory)
public boolean permissionExists(SpacePermission permission)
permissionExists
in interface SpacePermissionManager
permissionExists
in class DefaultSpacePermissionManager
permission
- the SpacePermission to look upprotected void savePermissionToDao(SpacePermission spacePermission)
savePermissionToDao
in class DefaultSpacePermissionManager
spacePermission
- the SpacePermission to saveprotected void removePermissionFromDao(SpacePermission spacePermission)
removePermissionFromDao
in class DefaultSpacePermissionManager
spacePermission
- the SpacePermission to removepublic void removeAllPermissions(Space space)
SpacePermissionManager
removeAllPermissions
in interface SpacePermissionManager
removeAllPermissions
in class DefaultSpacePermissionManager
space
- The space to remove the permissions forpublic void flushCaches()
flushCaches
in interface SpacePermissionManager
flushCaches
in class DefaultSpacePermissionManager
public boolean isLookAheadEnabled()
public void setLookAheadEnabled(boolean lookAheadEnabled)
public boolean hasPermission(java.lang.String permissionType, Space space, com.atlassian.user.User remoteUser)
SpacePermissionManager
PermissionManager
instead.hasPermission
in interface SpacePermissionManager
hasPermission
in class DefaultSpacePermissionManager
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)protected boolean canUseConfluence(com.atlassian.user.User remoteUser, java.lang.String permissionCheck)
canUseConfluence
in class DefaultSpacePermissionManager
protected java.util.Set<java.lang.String> getGroupNamesWithPermission(Space targetSpace, java.lang.String permissionType)
getGroupNamesWithPermission
in class DefaultSpacePermissionManager
public void removePermission(SpacePermission spacePermission)
DefaultSpacePermissionManager
removePermission
in interface SpacePermissionManager
removePermission
in class DefaultSpacePermissionManager
public void removeAllPermissionsForGroup(java.lang.String group)
removeAllPermissionsForGroup
in interface SpacePermissionManager
removeAllPermissionsForGroup
in class DefaultSpacePermissionManager
Copyright © 2003-2014 Atlassian. All Rights Reserved.