Class AbstractSpacePermissionManager
- java.lang.Object
-
- com.atlassian.confluence.security.AbstractSpacePermissionManager
-
- All Implemented Interfaces:
SpacePermissionManagerInternal
,SpacePermissionSaverInternal
,DefaultConfluenceAccessManager.AccessManagerPermissionChecker
,SpacePermissionManager
,SpacePermissionSaver
- Direct Known Subclasses:
DefaultSpacePermissionManager
@ParametersAreNonnullByDefault @Deprecated public abstract class AbstractSpacePermissionManager extends Object implements SpacePermissionManagerInternal, DefaultConfluenceAccessManager.AccessManagerPermissionChecker
Deprecated.since 7.16 useAbstractSpacePermissionManager
-
-
Field Summary
Fields Modifier and Type Field Description protected ConfluenceAccessManager
confluenceAccessManager
Deprecated.protected PermissionCheckExemptions
permissionCheckExemptions
Deprecated.protected SpacePermissionAccessMapper
spacePermissionAccessMapper
Deprecated.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractSpacePermissionManager(PermissionCheckExemptions permissionCheckExemptions, ConfluenceAccessManager confluenceAccessManager, SpacePermissionAccessMapper spacePermissionAccessMapper, com.atlassian.crowd.embedded.api.CrowdService crowdService, UserAccessor userAccessor, AccessModeManager accessModeManager, ScopesRequestCacheDelegate scopesRequestCacheDelegate)
Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected AccessModeManager
getAccessModeManager()
Deprecated.Set<SpacePermission>
getDefaultGlobalPermissions()
Deprecated.Returns the default global permissions that are created when Confluence is set up.protected abstract Iterable<String>
getGroupNamesWithPermission(@Nullable Space targetSpace, String permissionType)
Deprecated.protected UserAccessor
getUserAccessor()
Deprecated.boolean
groupHasPermission(String permissionType, @Nullable Space space, String group)
Deprecated.Checks whether the given group has the given permissionboolean
hasAllPermissions(List<String> permissionTypes, @Nullable Space space, @Nullable ConfluenceUser user)
Deprecated.Determines if remoteUser has all of the given permissions in spaceboolean
hasGlobalPermissionViaGroups(@NonNull ConfluenceUser user, String permissionType)
Deprecated.Used byDefaultConfluenceAccessManager
via an awkward circular dependency: hence this method must NOT call ConfluenceAccessManager.boolean
hasPermission(String permissionType, @Nullable Space space, @Nullable ConfluenceUser remoteUser)
Deprecated.Determines if remoteUser has the given permission in spaceboolean
hasPermissionForSpace(@Nullable ConfluenceUser user, List permissionTypes, @Nullable Space space)
Deprecated.boolean
hasPermissionNoExemptions(String permissionType, @Nullable Space space, @Nullable ConfluenceUser remoteUser)
Deprecated.Returns true if the user has the specified permission on the target space.boolean
isPermittedInReadOnlyAccessMode(String permissionType)
Deprecated.Check if the permission type is permitted in read only access mode-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.security.access.DefaultConfluenceAccessManager.AccessManagerPermissionChecker
hasGlobalPermissionViaGroups, permissionExists
-
Methods inherited from interface com.atlassian.confluence.security.SpacePermissionManager
createDefaultSpacePermissions, createPrivateSpacePermissions, flushCaches, getAllPermissionsForGroup, getGlobalPermissions, getGlobalPermissions, getGroupsForPermissionType, getGroupsWithPermissions, getUsersForPermissionType, getUsersWithPermissions, hasAllPermissions, hasPermission, hasPermissionForSpace, hasPermissionNoExemptions, permissionExists, removeAllPermissions, removeAllPermissionsForGroup, removeAllUserPermissions, removeGlobalPermissionForUser, removePermission
-
Methods inherited from interface com.atlassian.confluence.internal.security.SpacePermissionManagerInternal
removeAllPermissions, removeAllPermissionsForGroup, removeAllUserPermissions, removeGlobalPermissionForUser, removePermission
-
Methods inherited from interface com.atlassian.confluence.security.SpacePermissionSaver
savePermission
-
Methods inherited from interface com.atlassian.confluence.internal.security.SpacePermissionSaverInternal
savePermission
-
-
-
-
Field Detail
-
permissionCheckExemptions
protected PermissionCheckExemptions permissionCheckExemptions
Deprecated.
-
confluenceAccessManager
protected ConfluenceAccessManager confluenceAccessManager
Deprecated.
-
spacePermissionAccessMapper
protected SpacePermissionAccessMapper spacePermissionAccessMapper
Deprecated.
-
-
Constructor Detail
-
AbstractSpacePermissionManager
protected AbstractSpacePermissionManager(PermissionCheckExemptions permissionCheckExemptions, ConfluenceAccessManager confluenceAccessManager, SpacePermissionAccessMapper spacePermissionAccessMapper, com.atlassian.crowd.embedded.api.CrowdService crowdService, UserAccessor userAccessor, AccessModeManager accessModeManager, ScopesRequestCacheDelegate scopesRequestCacheDelegate)
Deprecated.- Since:
- 7.17
-
-
Method Detail
-
hasPermission
public final boolean hasPermission(String permissionType, @Nullable Space space, @Nullable ConfluenceUser remoteUser)
Deprecated.Description copied from interface:SpacePermissionManager
Determines if remoteUser has the given permission in spaceUnless you're writing code that is part of the permission checking implementation, or you're changing space permissions, you should be using
PermissionManager
instead.- Specified by:
hasPermission
in interfaceSpacePermissionManager
- Parameters:
permissionType
- The permission type to look upspace
- The space the permission applies to (can be null for global permissions)- Returns:
- true if remoteUser has the permission, false otherwise
-
hasPermissionNoExemptions
public boolean hasPermissionNoExemptions(String permissionType, @Nullable Space space, @Nullable ConfluenceUser remoteUser)
Deprecated.Description copied from interface:SpacePermissionManager
Returns true if the user has the specified permission on the target space. This method does not allow exemptions for super-users likeSpacePermissionManager.hasPermission(String, Space, User)
does.For parameter and return value information, see
SpacePermissionManager.hasPermission(String, Space, User)
.- Specified by:
hasPermissionNoExemptions
in interfaceSpacePermissionManager
-
hasAllPermissions
public final boolean hasAllPermissions(List<String> permissionTypes, @Nullable Space space, @Nullable ConfluenceUser user)
Deprecated.Description copied from interface:SpacePermissionManager
Determines if remoteUser has all of the given permissions in spaceIf 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.- Specified by:
hasAllPermissions
in interfaceSpacePermissionManager
- Parameters:
permissionTypes
- A List of permission types (see SpacePermission) to checkspace
- The space the permissions apply touser
- The user to look up- Returns:
- true if remoteUser has the permission, false otherwise
-
hasGlobalPermissionViaGroups
public final boolean hasGlobalPermissionViaGroups(@NonNull ConfluenceUser user, String permissionType)
Deprecated.Used byDefaultConfluenceAccessManager
via an awkward circular dependency: hence this method must NOT call ConfluenceAccessManager.- Specified by:
hasGlobalPermissionViaGroups
in interfaceDefaultConfluenceAccessManager.AccessManagerPermissionChecker
permissionType
- theSpacePermission
type to look for.- Returns:
- true if the user has this permission specifically via group memberships
-
groupHasPermission
public boolean groupHasPermission(String permissionType, @Nullable Space space, String group)
Deprecated.Description copied from interface:SpacePermissionManager
Checks whether the given group has the given permissionIf 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.
- Specified by:
groupHasPermission
in interfaceSpacePermissionManager
- Parameters:
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- Returns:
- true if the group has the required permission, false otherwise
-
getGroupNamesWithPermission
protected abstract Iterable<String> getGroupNamesWithPermission(@Nullable Space targetSpace, String permissionType)
Deprecated.
-
hasPermissionForSpace
public final boolean hasPermissionForSpace(@Nullable ConfluenceUser user, List permissionTypes, @Nullable Space space)
Deprecated.- Specified by:
hasPermissionForSpace
in interfaceSpacePermissionManager
-
getDefaultGlobalPermissions
public Set<SpacePermission> getDefaultGlobalPermissions()
Deprecated.Description copied from interface:SpacePermissionManager
Returns the default global permissions that are created when Confluence is set up. These will exist in a newly set up system but may be removed afterwards. Note that the returned objects are freshly created and therefore do not have IDs or other persistence data.By default, confluence-administrators group has admin access, the default confluence users group can view the system and anonymous access is disabled.
- Specified by:
getDefaultGlobalPermissions
in interfaceSpacePermissionManager
- Returns:
- a collection of
SpacePermission
s.
-
getUserAccessor
protected UserAccessor getUserAccessor()
Deprecated.
-
getAccessModeManager
protected AccessModeManager getAccessModeManager()
Deprecated.
-
isPermittedInReadOnlyAccessMode
public boolean isPermittedInReadOnlyAccessMode(String permissionType)
Deprecated.Description copied from interface:SpacePermissionManager
Check if the permission type is permitted in read only access mode- Specified by:
isPermittedInReadOnlyAccessMode
in interfaceSpacePermissionManager
- Parameters:
permissionType
- the permission type to be checked- Returns:
- true if the permission type is permitted in read only access mode
-
-