Package com.codebarrel.jira.permissions
Class NativePermissionsClient
java.lang.Object
com.codebarrel.jira.permissions.NativePermissionsClient
- All Implemented Interfaces:
PermissionsClient
-
Constructor Summary
ConstructorsConstructorDescriptionNativePermissionsClient(PermissionManager permissionManager, GlobalPermissionManager globalPermissionManager, ProjectManager projectManager, ApplicationUser currentUser) -
Method Summary
Modifier and TypeMethodDescriptiongetBulkPermissions(BulkPermissionRequest bulkPermissionRequest) Performs a bulk permission check and returns all granted permissions.getMyIssuePermissions(Long issueId, Set<String> permissionKeys) Retrieves the current user's permissions for a particular issuegetMyPermissions(Set<String> permissionKeys) Retrieves the current user's global permissions.getMyProjectPermissions(Long projectId, Set<String> permissionKeys) Retrieves the current user's permissions for a particular project
-
Constructor Details
-
NativePermissionsClient
public NativePermissionsClient(PermissionManager permissionManager, GlobalPermissionManager globalPermissionManager, ProjectManager projectManager, ApplicationUser currentUser)
-
-
Method Details
-
getMyPermissions
Description copied from interface:PermissionsClientRetrieves the current user's global permissions.- Specified by:
getMyPermissionsin interfacePermissionsClient- Returns:
- the current user's global permissions.
-
getMyProjectPermissions
Description copied from interface:PermissionsClientRetrieves the current user's permissions for a particular project- Specified by:
getMyProjectPermissionsin interfacePermissionsClient- Parameters:
projectId- the project to check permissions for- Returns:
- the current user's permissions for a particular project
-
getMyIssuePermissions
Description copied from interface:PermissionsClientRetrieves the current user's permissions for a particular issue- Specified by:
getMyIssuePermissionsin interfacePermissionsClient- Parameters:
issueId- the issue to check permissions for- Returns:
- the current user's permissions for a particular issue
-
getBulkPermissions
public Optional<BulkPermissionGrants> getBulkPermissions(BulkPermissionRequest bulkPermissionRequest) Description copied from interface:PermissionsClientPerforms a bulk permission check and returns all granted permissions.- Specified by:
getBulkPermissionsin interfacePermissionsClient- Parameters:
bulkPermissionRequest- the permissions to check- Returns:
- Granted permissions
-