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 Constructor Description DefaultSpacePermissionAccessMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.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.
-
-
-
Method Detail
-
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:
Either.Right
containing a NON-EMPTY set of permission subject types that apply for the given access status and permission type, orEither.Left
if there are no permission subject types that apply
-
-