Package com.codebarrel.jira.permissions
Interface RemotePermissionService
- All Known Implementing Classes:
NativePermissionService
public interface RemotePermissionService
Service to run permission checks on a remote tenant. Implementations should consider performance and cache
results.
-
Method Summary
Modifier and TypeMethodDescriptiongetProjectPermission(TenantProjectUserAccountId projectUserKey, String permissionKey) Returns the full permission object for the given user (regardless of if they have the permission or not)booleanhasGlobalPermission(TenantUserAccountId projectUserKey, String permissionKey) Checks if the user provided in the key object has the given permission on the provided tenant.booleanhasIssuePermission(TenantUserAccountId userKey, String permissionKey, long issueId) Checks if the user provided in the key object has browse issue permission on the provided tenant.booleanhasProjectPermission(TenantProjectUserAccountId projectUserKey, String permissionKey) Checks if the user provided in the key object has the given permission on the provided tenant and project.
-
Method Details
-
getProjectPermission
Optional<Permission> getProjectPermission(TenantProjectUserAccountId projectUserKey, String permissionKey) Returns the full permission object for the given user (regardless of if they have the permission or not)- Parameters:
projectUserKey- Key specifying the user, tenant and projectpermissionKey- The permission to check for- Returns:
- The full permission object.
-
hasProjectPermission
Checks if the user provided in the key object has the given permission on the provided tenant and project.- Parameters:
projectUserKey- Key specifying the user, tenant and projectpermissionKey- The permission to check for- Returns:
- True if the user has the permission in the provided project.
-
hasGlobalPermission
Checks if the user provided in the key object has the given permission on the provided tenant.- Parameters:
projectUserKey- Key specifying the user, tenantpermissionKey- The permission to check for- Returns:
- True if the user has the permission.
-
hasIssuePermission
Checks if the user provided in the key object has browse issue permission on the provided tenant. This check should only be necessary in server.- Parameters:
userKey- Key specifying the user, tenantpermissionKey- The permission to check forissueId- The issue to check for browse permission on- Returns:
- True if the user has the permission.
-