Interface RemoteGlobalPermissionService
- All Known Implementing Classes:
RemoteGlobalPermissionServiceImpl
public interface RemoteGlobalPermissionService
- Since:
- 9.2.5
-
Method Summary
Modifier and TypeMethodDescriptionGet all global permissionsGet the permissions granted to an anonymous users.Get the permissions granted to a group.Get the permissions granted to unlicensed users.Get the permissions granted to a user.grantPermissionsToAnonymousUsers
(Set<OperationDescription> permissions) Grants global permissions to anonymous users.grantPermissionsToGroup
(String groupName, Set<OperationDescription> permissions) Grants global permissions to a group.grantPermissionsToUnlicensedUsers
(Set<OperationDescription> permissions) Grants global permissions to unlicensed users.grantPermissionsToUser
(User user, Set<OperationDescription> permissions) Grants global permissions to a user.revokePermissionsFromAnonymousUsers
(Set<OperationDescription> permissions) Revoke global permissions from anonymous users.revokePermissionsFromGroup
(String groupName, Set<OperationDescription> permissions) Revoke global permissions from a group.revokePermissionsFromUnlicensedUsers
(Set<OperationDescription> permissions) Revoke global permissions from unlicensed users.revokePermissionsFromUser
(User user, Set<OperationDescription> permissions) Revoke global permissions from a user.setPermissions
(Set<SpacePermissionsForSubject> permissionsForSubjects) Sets global permissions to multiple users/groups.
-
Method Details
-
getAllPermissionsCompletionStage
CompletionStage<Iterable<GlobalPermission>> getAllPermissionsCompletionStage()Get all global permissions
- 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
-
getPermissionsGrantedToUserCompletionStage
Get the permissions granted to a user.
- Parameters:
user
- user whose permissions we retrieve- Returns:
- list of global permissions granted to the user
- Throws:
NotFoundException
- if user not foundPermissionException
- if user doesn't have permission to perform this action
-
getPermissionsGrantedToGroupCompletionStage
CompletionStage<Iterable<GlobalPermission>> getPermissionsGrantedToGroupCompletionStage(String groupName) Get the permissions granted to a group.
- Parameters:
groupName
- the group name- Returns:
- list of global permissions granted to group
- Throws:
NotFoundException
- if user not foundPermissionException
- if user doesn't have permission to perform this action
-
getPermissionsGrantedToAnonymousUsersCompletionStage
CompletionStage<Iterable<GlobalPermission>> getPermissionsGrantedToAnonymousUsersCompletionStage()Get the permissions granted to an anonymous users.
- Returns:
- list of global permissions granted to anonymous user
- Throws:
PermissionException
- if user doesn't have permission to perform this action
-
getPermissionsGrantedToUnlicensedUsersCompletionStage
CompletionStage<Iterable<GlobalPermission>> getPermissionsGrantedToUnlicensedUsersCompletionStage()Get the permissions granted to unlicensed users.
- Returns:
- list of global permissions granted to unlicensed users
- Throws:
PermissionException
- if user doesn't have permission to perform this action
-
grantPermissionsToGroup
CompletionStage<Void> grantPermissionsToGroup(String groupName, Set<OperationDescription> permissions) Grants global permissions to a group.
- Parameters:
groupName
- the name of the grouppermissions
- the permissions being granted- Throws:
NotFoundException
- if group not foundPermissionException
- if current user doesn't have permission to perform this action
-
grantPermissionsToUser
Grants global permissions to a user.
- Parameters:
user
- the user to whom we grant permissionspermissions
- the permissions being granted- Throws:
NotFoundException
- if user not foundPermissionException
- if current user doesn't have permission to perform this action
-
grantPermissionsToAnonymousUsers
Grants global permissions to anonymous users.
- Parameters:
permissions
- the permissions being granted- Throws:
PermissionException
- if current user doesn't have permission to perform this action
-
grantPermissionsToUnlicensedUsers
Grants global permissions to unlicensed users.
- Parameters:
permissions
- the permissions being granted- Throws:
PermissionException
- if current user doesn't have permission to perform this action
-
revokePermissionsFromGroup
CompletionStage<Void> revokePermissionsFromGroup(String groupName, Set<OperationDescription> permissions) Revoke global permissions from a group.
- Parameters:
groupName
- the name of the grouppermissions
- the permissions being revoked- Throws:
NotFoundException
- if group not foundPermissionException
- if current user doesn't have permission to perform this action
-
revokePermissionsFromUser
Revoke global permissions from a user.
- Parameters:
user
- the user from whom we revoke permissionspermissions
- the permissions being revoked- Throws:
NotFoundException
- if user not foundPermissionException
- if current user doesn't have permission to perform this action
-
revokePermissionsFromAnonymousUsers
Revoke global permissions from anonymous users.
- Parameters:
permissions
- the permissions being revoked- Throws:
PermissionException
- if current user doesn't have permission to perform this action
-
revokePermissionsFromUnlicensedUsers
Revoke global permissions from unlicensed users.
- Parameters:
permissions
- the permissions being revoked- Throws:
PermissionException
- if current user doesn't have permission to perform this action
-
setPermissions
Sets global permissions to multiple users/groups. Request should contain all permissions that user/group will have. If permission is absent in the request, but was granted before, it will be revoked. If empty list of permissions passed to user/group, then all their existing permissions will be revoked. If user/group not mentioned in the request, their permissions will not be revoked. Maximum 40 different users/groups could be passed in the request by default.- Parameters:
permissionsForSubjects
- a set of operations granted users or groups- Throws:
NotFoundException
- if user/group not foundPermissionException
- if current user doesn't have permission to perform this action
-