Skip to content

Function: getPermissions() ​

ts
function getPermissions(
   client, 
   parameters?, 
   options?
): Promise<{
[key: string]: unknown;
  permissions?: Record<string, {
   [key: string]: unknown;
     description?: string;
     id?: string;
     key?: string;
     name?: string;
     type?: string & object | "PROJECT" | "GLOBAL";
  }>;
}>;

Defined in: src/server/api/permissions.ts:9

Returns all permissions in the system and whether the currently logged in user has them. You can optionally provide a specific context to get permissions for (projectKey OR projectId OR issueKey OR issueId)

Parameters ​

ParameterTypeDescription
clientClient-
parameters?{ issueId?: string; issueKey?: string; projectId?: string; projectKey?: string; }-
parameters.issueId?stringId of the issue to scope returned permissions for.
parameters.issueKey?stringKey of the issue to scope returned permissions for.
parameters.projectId?stringId of project to scope returned permissions for.
parameters.projectKey?stringKey of project to scope returned permissions for.
options?RequestOptions-

Returns ​

Promise<{ [key: string]: unknown; permissions?: Record<string, { [key: string]: unknown; description?: string; id?: string; key?: string; name?: string; type?: string & object | "PROJECT" | "GLOBAL"; }>; }>