Class SpacePermissionServiceImpl
java.lang.Object
com.atlassian.confluence.api.impl.service.permissions.SpacePermissionServiceImpl
- All Implemented Interfaces:
SpacePermissionService
- Since:
- 9.1.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSpacePermissionServiceImpl
(SpacePermissionManagerInternal spacePermissionManager, SpaceManagerInternal spaceManager, SpacePermissionOperationKeyConverter spacePermissionOperationKeyConverter, UserAccessor userAccessor, SpacePermissionsValidator spacePermissionsValidator, SetSpacePermissionChecker setSpacePermissionChecker, UserChecker userChecker, ScopesRequestCacheDelegate scopesRequestCacheDelegate) -
Method Summary
Modifier and TypeMethodDescriptiongetAllPermissions
(String spaceKey) Get all space permissionsgetPermissionsGrantedToAnonymousUsers
(String spaceKey) Get the permissions granted to an anonymous users in the given space.getPermissionsGrantedToGroup
(String spaceKey, String groupName) Get the permissions granted to a group in the given space.getPermissionsGrantedToUser
(String spaceKey, String userKey) Get the permissions granted to a user in the given space.void
grantPermissionsToAnonymousUser
(String spaceKey, Set<OperationDescription> permissions) Grants permissions to an anonymous user in the given space.void
grantPermissionsToGroup
(String spaceKey, String groupName, Set<OperationDescription> permissions) Grants permissions to a user in the given space.void
grantPermissionsToUser
(String spaceKey, String userKey, Set<OperationDescription> permissions) Grants permissions to a user in the given space.void
removePermissionsFromAnonymousUser
(String spaceKey, Set<OperationDescription> permissions) Remove space permissions from an anonymous user in the given space.void
removePermissionsFromGroup
(String spaceKey, String groupName, Set<OperationDescription> permissions) Remove space permissions from a group in the given space.void
removePermissionsFromUser
(String spaceKey, String userKey, Set<OperationDescription> permissions) Remove space permissions from a user in the given space.void
setPermissions
(String spaceKey, Set<SpacePermissionsForSubject> spacePermissionsForSubjects) Sets permissions to multiple users/groups in the given space.
-
Field Details
-
MAX_ENTRIES
-
-
Constructor Details
-
SpacePermissionServiceImpl
public SpacePermissionServiceImpl(SpacePermissionManagerInternal spacePermissionManager, SpaceManagerInternal spaceManager, SpacePermissionOperationKeyConverter spacePermissionOperationKeyConverter, UserAccessor userAccessor, SpacePermissionsValidator spacePermissionsValidator, SetSpacePermissionChecker setSpacePermissionChecker, UserChecker userChecker, ScopesRequestCacheDelegate scopesRequestCacheDelegate)
-
-
Method Details
-
grantPermissionsToUser
public void grantPermissionsToUser(String spaceKey, String userKey, Set<OperationDescription> permissions) Description copied from interface:SpacePermissionService
Grants permissions to a user in the given space.
- Specified by:
grantPermissionsToUser
in interfaceSpacePermissionService
- Parameters:
spaceKey
- the key of the space to updateuserKey
- the user keypermissions
- the permissions being granted
-
grantPermissionsToAnonymousUser
Description copied from interface:SpacePermissionService
Grants permissions to an anonymous user in the given space.
- Specified by:
grantPermissionsToAnonymousUser
in interfaceSpacePermissionService
- Parameters:
spaceKey
- the key of the space to updatepermissions
- the permissions being granted
-
grantPermissionsToGroup
public void grantPermissionsToGroup(String spaceKey, String groupName, Set<OperationDescription> permissions) Description copied from interface:SpacePermissionService
Grants permissions to a user in the given space.
- Specified by:
grantPermissionsToGroup
in interfaceSpacePermissionService
- Parameters:
spaceKey
- the key of the space to updategroupName
- the name of the grouppermissions
- the permissions being granted
-
removePermissionsFromUser
public void removePermissionsFromUser(String spaceKey, String userKey, Set<OperationDescription> permissions) Description copied from interface:SpacePermissionService
Remove space permissions from a user in the given space.
- Specified by:
removePermissionsFromUser
in interfaceSpacePermissionService
- Parameters:
spaceKey
- the key of the space to updateuserKey
- the user keypermissions
- the permissions being revoked
-
removePermissionsFromAnonymousUser
public void removePermissionsFromAnonymousUser(String spaceKey, Set<OperationDescription> permissions) Description copied from interface:SpacePermissionService
Remove space permissions from an anonymous user in the given space.
- Specified by:
removePermissionsFromAnonymousUser
in interfaceSpacePermissionService
- Parameters:
spaceKey
- the key of the space to updatepermissions
- the permissions being revoked
-
removePermissionsFromGroup
public void removePermissionsFromGroup(String spaceKey, String groupName, Set<OperationDescription> permissions) Description copied from interface:SpacePermissionService
Remove space permissions from a group in the given space.
- Specified by:
removePermissionsFromGroup
in interfaceSpacePermissionService
- Parameters:
spaceKey
- the key of the space to updategroupName
- the name of the grouppermissions
- the permissions being revoked
-
getPermissionsGrantedToUser
Description copied from interface:SpacePermissionService
Get the permissions granted to a user in the given space.
- Specified by:
getPermissionsGrantedToUser
in interfaceSpacePermissionService
- Parameters:
spaceKey
- the key of the spaceuserKey
- the user key- Returns:
- list of space permissions granted to the user
-
getPermissionsGrantedToAnonymousUsers
Description copied from interface:SpacePermissionService
Get the permissions granted to an anonymous users in the given space.
- Specified by:
getPermissionsGrantedToAnonymousUsers
in interfaceSpacePermissionService
- Parameters:
spaceKey
- the key of the space- Returns:
- list of space permissions granted to the user
-
getPermissionsGrantedToGroup
Description copied from interface:SpacePermissionService
Get the permissions granted to a group in the given space.
- Specified by:
getPermissionsGrantedToGroup
in interfaceSpacePermissionService
- Parameters:
spaceKey
- the key of the spacegroupName
- the name of the group- Returns:
- list of space permissions granted to the group
-
getAllPermissions
Description copied from interface:SpacePermissionService
Get all space permissions
- Specified by:
getAllPermissions
in interfaceSpacePermissionService
- Parameters:
spaceKey
- the key of the space- Returns:
- list of permissions granted to users and groups in the particular space
-
setPermissions
public void setPermissions(String spaceKey, Set<SpacePermissionsForSubject> spacePermissionsForSubjects) Description copied from interface:SpacePermissionService
Sets permissions to multiple users/groups in the given space. Request should contain all permissions that user/group/anonymous user will have in a given space. If permission is absent in the request, but was granted before, it will be revoked. If empty list of permissions passed to user/group/anonymous user, then all their existing permissions will be revoked. If user/group/anonymous user not mentioned in the request, their permissions will not be revoked. Maximum 40 different users/groups/anonymous user could be passed in the request.- Specified by:
setPermissions
in interfaceSpacePermissionService
- Parameters:
spaceKey
- the key of the space to updatespacePermissionsForSubjects
- the name of the group
-