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 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 project
      permissionKey - The permission to check for
      Returns:
      The full permission object.
    • hasProjectPermission

      boolean hasProjectPermission(TenantProjectUserAccountId projectUserKey, String permissionKey)
      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 project
      permissionKey - The permission to check for
      Returns:
      True if the user has the permission in the provided project.
    • hasGlobalPermission

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

      boolean hasIssuePermission(TenantUserAccountId userKey, String permissionKey, long issueId)
      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, tenant
      permissionKey - The permission to check for
      issueId - The issue to check for browse permission on
      Returns:
      True if the user has the permission.