Interface GlobalPermissionService
- All Known Implementing Classes:
GlobalPermissionServiceImpl
public interface GlobalPermissionService
Provides mutable operations for SpacePermissions
- Since:
- 9.2.5
-
Method Summary
Modifier and TypeMethodDescriptionGet all global permissionsGet the permissions granted to an anonymous users.getPermissionsGrantedToGroup
(String groupName) Get the permissions granted to a group.Get the permissions granted to unlicensed users.Get the permissions granted to a user.void
grantPermissionsToAnonymousUsers
(Set<OperationDescription> permissions) Grants global permissions to anonymous users.void
grantPermissionsToGroup
(String groupName, Set<OperationDescription> permissions) Grants global permissions to a group.void
grantPermissionsToUnlicensedUsers
(Set<OperationDescription> permissions) Grants global permissions to unlicensed users.void
grantPermissionsToUser
(User user, Set<OperationDescription> permissions) Grants global permissions to a user.void
revokePermissionsFromAnonymousUsers
(Set<OperationDescription> permissions) Revoke global permissions from anonymous users.void
revokePermissionsFromGroup
(String groupName, Set<OperationDescription> permissions) Revoke global permissions from a group.void
revokePermissionsFromUnlicensedUsers
(Set<OperationDescription> permissions) Revoke global permissions from unlicensed users.void
revokePermissionsFromUser
(User user, Set<OperationDescription> permissions) Revoke global permissions from a user.void
setPermissions
(Set<SpacePermissionsForSubject> permissionsForSubjects) Sets global permissions to multiple users/groups.
-
Method Details
-
getAllPermissions
List<GlobalPermission> getAllPermissions()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
-
getPermissionsGrantedToUser
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 current user doesn't have permission to perform this action
-
getPermissionsGrantedToGroup
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 current user doesn't have permission to perform this action
-
getPermissionsGrantedToAnonymousUsers
List<GlobalPermission> getPermissionsGrantedToAnonymousUsers()Get the permissions granted to an anonymous users.
- Returns:
- list of global permissions granted to anonymous user
- Throws:
PermissionException
- if current user doesn't have permission to perform this action
-
getPermissionsGrantedToUnlicensedUsers
List<GlobalPermission> getPermissionsGrantedToUnlicensedUsers()Get the permissions granted to unlicensed users.
- Returns:
- list of global permissions granted to unlicensed users
- Throws:
PermissionException
- if current user doesn't have permission to perform this action
-
grantPermissionsToGroup
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
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
-