Interface RemoteSpacePermissionService
- All Known Implementing Classes:
- RemoteSpacePermissionServiceImpl
public interface RemoteSpacePermissionService
- 
Method SummaryModifier 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.grantPermissionsToAnonymousUser(String spaceKey, Set<OperationDescription> permissions) Grants permissions to an anonymous user in the given space.grantPermissionsToGroup(String spaceKey, String groupName, Set<OperationDescription> permissions) Grants permissions to a user in the given space.grantPermissionsToUser(String spaceKey, String userKey, Set<OperationDescription> permissions) Grants permissions to a user in the given space.removePermissionsFromAnonymousUser(String spaceKey, Set<OperationDescription> permissions) Remove space permissions from an anonymous user in the given space.removePermissionsFromGroup(String spaceKey, String groupName, Set<OperationDescription> permissions) Remove space permissions from a group in the given space.removePermissionsFromUser(String spaceKey, String userKey, Set<OperationDescription> permissions) Remove space permissions from a user in the given space.setPermissions(String spaceKey, Set<SpacePermissionsForSubject> spacePermissionsForSubjects) Sets permissions to multiple users/groups in the given space.
- 
Method Details- 
getPermissionsGrantedToUserCompletionStage<Iterable<SpacePermission>> getPermissionsGrantedToUser(String spaceKey, String userKey) Get the permissions granted to a user in the given space. - Parameters:
- spaceKey- the key of the space
- userKey- the user key
- Returns:
- list of space permissions granted to the user
- Throws:
- NotFoundException- if user not found
- PermissionException- if user doesn't have permission to perform this action
 
- 
getPermissionsGrantedToAnonymousUsersGet the permissions granted to an anonymous users in the given space. - Parameters:
- spaceKey- the key of the space
- Returns:
- list of space permissions granted to the user
- Throws:
- PermissionException- if user doesn't have permission to perform this action
 
- 
getPermissionsGrantedToGroupCompletionStage<Iterable<SpacePermission>> getPermissionsGrantedToGroup(String spaceKey, String groupName) Get the permissions granted to a group in the given space. - Parameters:
- spaceKey- the key of the space
- groupName- the name of the group
- Returns:
- list of space permissions granted to the group
- Throws:
- NotFoundException- if group not found
- PermissionException- if user doesn't have permission to perform this action
 
- 
getAllPermissionsGet all space permissions - Parameters:
- spaceKey- the key of the space
- Returns:
- list of permissions granted to users and groups in the particular space
- Throws:
- PermissionException- if user doesn't have permission to perform this action
 
- 
grantPermissionsToUserCompletionStage<Void> grantPermissionsToUser(String spaceKey, String userKey, Set<OperationDescription> permissions) Grants permissions to a user in the given space. - Parameters:
- spaceKey- the key of the space to update
- userKey- the user key
- permissions- the permissions being granted
- Throws:
- NotFoundException- if user not found
- PermissionException- if user doesn't have permission to perform this action
 
- 
grantPermissionsToAnonymousUserCompletionStage<Void> grantPermissionsToAnonymousUser(String spaceKey, Set<OperationDescription> permissions) Grants permissions to an anonymous user in the given space. - Parameters:
- spaceKey- the key of the space to update
- permissions- the permissions being granted
- Throws:
- PermissionException- if user doesn't have permission to perform this action
 
- 
grantPermissionsToGroupCompletionStage<Void> grantPermissionsToGroup(String spaceKey, String groupName, Set<OperationDescription> permissions) Grants permissions to a user in the given space. - Parameters:
- spaceKey- the key of the space to update
- groupName- the name of the group
- permissions- the permissions being granted
- Throws:
- NotFoundException- if group not found
- PermissionException- if user doesn't have permission to perform this action
 
- 
removePermissionsFromUserCompletionStage<Void> removePermissionsFromUser(String spaceKey, String userKey, Set<OperationDescription> permissions) Remove space permissions from a user in the given space. - Parameters:
- spaceKey- the key of the space to update
- userKey- the user key
- permissions- the permissions being revoked
- Throws:
- NotFoundException- if user not found
- PermissionException- if user doesn't have permission to perform this action
 
- 
removePermissionsFromAnonymousUserCompletionStage<Void> removePermissionsFromAnonymousUser(String spaceKey, Set<OperationDescription> permissions) Remove space permissions from an anonymous user in the given space. - Parameters:
- spaceKey- the key of the space to update
- permissions- the permissions being revoked
- Throws:
- NotFoundException- if group not found
- PermissionException- if user doesn't have permission to perform this action
 
- 
removePermissionsFromGroupCompletionStage<Void> removePermissionsFromGroup(String spaceKey, String groupName, Set<OperationDescription> permissions) Remove space permissions from a group in the given space. - Parameters:
- spaceKey- the key of the space to update
- groupName- the name of the group
- permissions- the permissions being revoked
- Throws:
- NotFoundException- if group not found
- PermissionException- if user doesn't have permission to perform this action
 
- 
setPermissionsCompletionStage<Void> setPermissions(String spaceKey, Set<SpacePermissionsForSubject> spacePermissionsForSubjects) 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.- Parameters:
- spaceKey- the key of the space to update
- spacePermissionsForSubjects- the name of the group
- Throws:
- NotFoundException- if group not found
- PermissionException- if user doesn't have permission to perform this action
 
 
-