@ParametersAreNonnullByDefault public abstract class AbstractSpacePermissionManager extends Object implements SpacePermissionManagerInternal, DefaultConfluenceAccessManager.AccessManagerPermissionChecker
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSpacePermissionManager(PermissionCheckExemptions permissionCheckExemptions,
ConfluenceAccessManager confluenceAccessManager,
SpacePermissionAccessMapper spacePermissionAccessMapper,
com.atlassian.crowd.embedded.api.CrowdService crowdService,
AccessModeManager accessModeManager,
ScopesRequestCacheDelegate scopesRequestCacheDelegate,
GlobalSettingsManager settingsManager) |
| Modifier and Type | Method and Description |
|---|---|
Set<SpacePermission> |
getDefaultGlobalPermissions()
Returns the default global permissions that are created when Confluence is set up.
|
protected abstract Iterable<String> |
getGroupNamesWithPermission(@Nullable Space targetSpace,
String permissionType) |
boolean |
groupHasPermission(String permissionType,
@Nullable Space space,
String group)
Checks whether the given group has the given permission
|
boolean |
hasAllPermissions(List<String> permissionTypes,
@Nullable Space space,
@Nullable com.atlassian.user.User user)
Determines if remoteUser has all of the given permissions in space
|
boolean |
hasGlobalPermissionViaGroups(@NonNull com.atlassian.user.User user,
String permissionType)
Used by
DefaultConfluenceAccessManager via an awkward circular dependency:
hence this method must NOT call ConfluenceAccessManager. |
boolean |
hasPermission(String permissionType,
@Nullable Space space,
@Nullable com.atlassian.user.User remoteUser)
Determines if remoteUser has the given permission in space
|
boolean |
hasPermissionForSpace(@Nullable com.atlassian.user.User user,
List permissionTypes,
@Nullable Space space) |
boolean |
hasPermissionNoExemptions(String permissionType,
@Nullable Space space,
@Nullable 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, createPrivateSpacePermissions, flushCaches, getAllPermissionsForGroup, getGlobalPermissions, getGlobalPermissions, getGroupsForPermissionType, getGroupsWithPermissions, getUsersForPermissionType, getUsersWithPermissions, permissionExists, removeAllPermissions, removeAllPermissionsForGroup, removeAllUserPermissions, removeGlobalPermissionForUser, removePermissionsavePermissionsavePermissionpermissionExistsprotected AbstractSpacePermissionManager(PermissionCheckExemptions permissionCheckExemptions, ConfluenceAccessManager confluenceAccessManager, SpacePermissionAccessMapper spacePermissionAccessMapper, com.atlassian.crowd.embedded.api.CrowdService crowdService, AccessModeManager accessModeManager, ScopesRequestCacheDelegate scopesRequestCacheDelegate, GlobalSettingsManager settingsManager)
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 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.public boolean isPermittedInReadOnlyAccessMode(String permissionType)
SpacePermissionManagerisPermittedInReadOnlyAccessMode in interface SpacePermissionManagerpermissionType - the permission type to be checkedCopyright © 2003–2022 Atlassian. All rights reserved.