Package com.codebarrel.jira.permissions
Class NativePermissionService
java.lang.Object
com.codebarrel.jira.permissions.NativePermissionService
- All Implemented Interfaces:
RemotePermissionService
-
Constructor Summary
ConstructorsConstructorDescriptionNativePermissionService(PermissionManager permissionManager, GlobalPermissionManager globalPermissionManager, ProjectManager projectManager, UserManager userManager, I18nHelper.BeanFactory i18nFactory, IssueManager issueManager) -
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.
-
Constructor Details
-
NativePermissionService
@Inject public NativePermissionService(PermissionManager permissionManager, GlobalPermissionManager globalPermissionManager, ProjectManager projectManager, UserManager userManager, I18nHelper.BeanFactory i18nFactory, IssueManager issueManager)
-
-
Method Details
-
getProjectPermission
public Optional<Permission> getProjectPermission(TenantProjectUserAccountId projectUserKey, String permissionKey) Description copied from interface:RemotePermissionServiceReturns the full permission object for the given user (regardless of if they have the permission or not)- Specified by:
getProjectPermissionin interfaceRemotePermissionService- Parameters:
projectUserKey- Key specifying the user, tenant and projectpermissionKey- The permission to check for- Returns:
- The full permission object.
-
hasProjectPermission
public boolean hasProjectPermission(TenantProjectUserAccountId projectUserKey, String permissionKey) Description copied from interface:RemotePermissionServiceChecks if the user provided in the key object has the given permission on the provided tenant and project.- Specified by:
hasProjectPermissionin interfaceRemotePermissionService- 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
Description copied from interface:RemotePermissionServiceChecks if the user provided in the key object has the given permission on the provided tenant.- Specified by:
hasGlobalPermissionin interfaceRemotePermissionService- Parameters:
projectUserKey- Key specifying the user, tenantpermissionKey- The permission to check for- Returns:
- True if the user has the permission.
-
hasIssuePermission
Description copied from interface:RemotePermissionServiceChecks if the user provided in the key object has browse issue permission on the provided tenant. This check should only be necessary in server.- Specified by:
hasIssuePermissionin interfaceRemotePermissionService- 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.
-