Class NativePermissionService

java.lang.Object
com.codebarrel.jira.permissions.NativePermissionService
All Implemented Interfaces:
RemotePermissionService

@Named public class NativePermissionService extends Object implements RemotePermissionService
  • Constructor Details

  • Method Details

    • getProjectPermission

      public Optional<Permission> getProjectPermission(TenantProjectUserAccountId projectUserKey, String permissionKey)
      Description copied from interface: RemotePermissionService
      Returns the full permission object for the given user (regardless of if they have the permission or not)
      Specified by:
      getProjectPermission in interface RemotePermissionService
      Parameters:
      projectUserKey - Key specifying the user, tenant and project
      permissionKey - The permission to check for
      Returns:
      The full permission object.
    • hasProjectPermission

      public boolean hasProjectPermission(TenantProjectUserAccountId projectUserKey, String permissionKey)
      Description copied from interface: RemotePermissionService
      Checks if the user provided in the key object has the given permission on the provided tenant and project.
      Specified by:
      hasProjectPermission in interface RemotePermissionService
      Parameters:
      projectUserKey - Key specifying the user, tenant and project
      permissionKey - The permission to check for
      Returns:
      True if the user has the permission in the provided project.
    • hasGlobalPermission

      public boolean hasGlobalPermission(TenantUserAccountId projectUserKey, String permissionKey)
      Description copied from interface: RemotePermissionService
      Checks if the user provided in the key object has the given permission on the provided tenant.
      Specified by:
      hasGlobalPermission in interface RemotePermissionService
      Parameters:
      projectUserKey - Key specifying the user, tenant
      permissionKey - The permission to check for
      Returns:
      True if the user has the permission.
    • hasIssuePermission

      public boolean hasIssuePermission(TenantUserAccountId userKey, String permissionKey, long issueId)
      Description copied from interface: RemotePermissionService
      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.
      Specified by:
      hasIssuePermission in interface RemotePermissionService
      Parameters:
      userKey - Key specifying the user, tenant
      permissionKey - The permission to check for
      issueId - The issue to check for browse permission on
      Returns:
      True if the user has the permission.