@ParametersAreNonnullByDefault public abstract class AbstractSpacePermissionManager extends Object implements SpacePermissionManagerInternal, DefaultConfluenceAccessManager.AccessManagerPermissionChecker
| Modifier and Type | Field and Description |
|---|---|
protected ConfluenceAccessManager |
confluenceAccessManager |
protected PermissionCheckExemptions |
permissionCheckExemptions |
protected SpacePermissionAccessMapper |
spacePermissionAccessMapper |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSpacePermissionManager(PermissionCheckExemptions permissionCheckExemptions,
ConfluenceAccessManager confluenceAccessManager,
SpacePermissionAccessMapper spacePermissionAccessMapper,
com.atlassian.crowd.embedded.api.CrowdService crowdService,
com.google.common.base.Supplier<UserAccessor> userAccessor,
AccessModeManager accessModeManager) |
| Modifier and Type | Method and Description |
|---|---|
protected AccessModeManager |
getAccessModeManager() |
Set<SpacePermission> |
getDefaultGlobalPermissions()
Returns the default global permissions that are created when Confluence is set up.
|
protected abstract Iterable<String> |
getGroupNamesWithPermission(Space targetSpace,
String permissionType) |
protected UserAccessor |
getUserAccessor() |
boolean |
groupHasPermission(String permissionType,
Space space,
String group)
Checks whether the given group has the given permission
|
boolean |
hasAllPermissions(List<String> permissionTypes,
Space space,
com.atlassian.user.User user)
Determines if remoteUser has all of the given permissions in space
|
boolean |
hasGlobalPermissionViaGroups(com.atlassian.user.User user,
String permissionType)
Used by
DefaultConfluenceAccessManager via an awkward circular dependency:
hence this method must NOT call ConfluenceAccessManager. |
boolean |
hasPermission(List permissionTypes,
Space space,
com.atlassian.user.User user)
Deprecated.
|
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 |
hasPermissionNoExemptions(String permissionType,
Space space,
com.atlassian.user.User remoteUser)
Returns true if the user has the specified permission on the target space.
|
boolean |
isPermittedInReadOnlyAccessMode(String permissionType)
Check if the permission type is permitted in read only access mode
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitremoveAllPermissions, removeAllPermissionsForGroup, removeAllUserPermissions, removeGlobalPermissionForUser, removePermissioncreateDefaultSpacePermissions, createInitialSpacePermissions, createPrivateSpacePermissions, flushCaches, getAllPermissionsForGroup, getGlobalPermissions, getGlobalPermissions, getGroupsForPermissionType, getGroupsWithPermissions, getUsersForPermissionType, getUsersWithPermissions, permissionExists, removeAllPermissions, removeAllPermissionsForGroup, removeAllUserPermissions, removeAllUserPermissions, removeGlobalPermissionForUser, removePermissionsavePermissionsavePermissionpermissionExistsprotected PermissionCheckExemptions permissionCheckExemptions
protected ConfluenceAccessManager confluenceAccessManager
protected SpacePermissionAccessMapper spacePermissionAccessMapper
protected AbstractSpacePermissionManager(PermissionCheckExemptions permissionCheckExemptions, ConfluenceAccessManager confluenceAccessManager, SpacePermissionAccessMapper spacePermissionAccessMapper, com.atlassian.crowd.embedded.api.CrowdService crowdService, com.google.common.base.Supplier<UserAccessor> userAccessor, AccessModeManager accessModeManager)
public final boolean hasPermission(String permissionType, @Nullable Space space, @Nullable com.atlassian.user.User remoteUser)
SpacePermissionManager
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.
hasPermission in interface SpacePermissionManagerpermissionType - 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 hasPermissionNoExemptions(String permissionType, @Nullable Space space, @Nullable com.atlassian.user.User remoteUser)
SpacePermissionManagerSpacePermissionManager.hasPermission(String, Space, User) does.
For parameter and return value information, see SpacePermissionManager.hasPermission(String, Space, User).
hasPermissionNoExemptions in interface SpacePermissionManagerpublic final boolean hasPermission(List permissionTypes, @Nullable Space space, @Nullable com.atlassian.user.User user)
hasAllPermissions(java.util.List, com.atlassian.confluence.spaces.Space, com.atlassian.user.User)SpacePermissionManagerIf remoteUser lacks any of the given permissions, false is returned.
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.
hasPermission in interface SpacePermissionManagerpermissionTypes - A List of permission types (see SpacePermission) to checkspace - The space the permissions apply touser - The user to look uppublic final boolean hasAllPermissions(List<String> permissionTypes, @Nullable Space space, @Nullable com.atlassian.user.User user)
SpacePermissionManagerIf remoteUser lacks any of the given permissions, false is returned.
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.
hasAllPermissions in interface SpacePermissionManagerpermissionTypes - A List of permission types (see SpacePermission) to checkspace - The space the permissions apply touser - The user to look uppublic final boolean hasGlobalPermissionViaGroups(@Nonnull com.atlassian.user.User user, String permissionType)
DefaultConfluenceAccessManager via an awkward circular dependency:
hence this method must NOT call ConfluenceAccessManager.hasGlobalPermissionViaGroups in interface DefaultConfluenceAccessManager.AccessManagerPermissionCheckerpermissionType - the SpacePermission type to look for.public boolean groupHasPermission(String permissionType, @Nullable Space space, String group)
SpacePermissionManagerIf 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.
groupHasPermission in interface SpacePermissionManagerpermissionType - 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 forprotected abstract Iterable<String> getGroupNamesWithPermission(@Nullable Space targetSpace, String permissionType)
public final boolean hasPermissionForSpace(@Nullable com.atlassian.user.User user, List permissionTypes, @Nullable Space space)
hasPermissionForSpace in interface SpacePermissionManagerpublic Set<SpacePermission> getDefaultGlobalPermissions()
SpacePermissionManagerBy default, confluence-administrators group has admin access, the default confluence users group can view the system and anonymous access is disabled.
getDefaultGlobalPermissions in interface SpacePermissionManagerSpacePermissions.protected UserAccessor getUserAccessor()
protected AccessModeManager getAccessModeManager()
public boolean isPermittedInReadOnlyAccessMode(String permissionType)
SpacePermissionManagerisPermittedInReadOnlyAccessMode in interface SpacePermissionManagerpermissionType - the permission type to be checkedCopyright © 2003–2019 Atlassian. All rights reserved.