Class DefaultSpacePermissionAccessMapper
java.lang.Object
com.atlassian.confluence.impl.security.access.DefaultSpacePermissionAccessMapper
- All Implemented Interfaces:
SpacePermissionAccessMapper
public class DefaultSpacePermissionAccessMapper
extends Object
implements SpacePermissionAccessMapper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.atlassian.fugue.Either
<AccessDenied, Set<SpacePermissionSubjectType>> getPermissionCheckSubjectTypes
(@NonNull AccessStatus accessStatus, @NonNull String permissionType) Determines the permission subject types that apply for a given user'sAccessStatus
and the space permission type being checked.
-
Constructor Details
-
DefaultSpacePermissionAccessMapper
public DefaultSpacePermissionAccessMapper()
-
-
Method Details
-
getPermissionCheckSubjectTypes
public com.atlassian.fugue.Either<AccessDenied,Set<SpacePermissionSubjectType>> getPermissionCheckSubjectTypes(@NonNull AccessStatus accessStatus, @NonNull String permissionType) Description copied from interface:SpacePermissionAccessMapper
Determines the permission subject types that apply for a given user's
AccessStatus
and the space permission type being checked.Examples:
- licensed users receive a permission if any permission subject type grants them that permission
- users with unlicensed authenticated access only receive a permission if the "all users" subject type has that permission
- anonymous users only receive a permission if the "anonymous" permission subject type has that permission
- anonymous and users with unlicensed authenticated access users can't ever receive
SpacePermission.ADMINISTER_SPACE_PERMISSION
, so will be denied - users without access to Confluence can't receive any permissions, so will be denied
A result of
AccessDenied
will be returned if either: the user (may be anonymous) does not have access to Confluence OR the given permission type is invalid for the user'sAccessStatus
.- Specified by:
getPermissionCheckSubjectTypes
in interfaceSpacePermissionAccessMapper
- Parameters:
accessStatus
- access status for the userpermissionType
- the type ofSpacePermission
being checked- Returns:
-
invalid reference
Either.Right
invalid reference
Either.Left
-