Function: checkContentPermission()
function checkContentPermission(client, parameters): Promise<{
[key: string]: unknown;
_links?: {
[key: string]: unknown;
base?: string;
byOperation?: string;
collection?: string;
context?: string;
download?: string;
editui?: string;
edituiv2?: string;
next?: string;
prev?: string;
self?: string;
tinyui?: string;
webui?: string;
};
errors?: object[];
hasPermission: boolean;
}>;Defined in: src/v1/api/contentPermissions.ts:19
Check if a user or a group can perform an operation to the specified content. The operation to check must be provided. The user’s account ID or the ID of the group can be provided in the subject to check permissions against a specified user or group. The following permission checks are done to make sure that the user or group has the proper access:
- Site permissions
- Space permissions
- Content restrictions
Permissions required: Permission to access the Confluence site ('Can use' global permission) if checking permission for self, otherwise 'Confluence Administrator' global permission is required.
Parameters
| Parameter | Type | Description |
|---|---|---|
client | Client | - |
parameters | { id: string; operation: "update" | "delete" | "read"; subject: { [key: string]: unknown; identifier: string; type: "user" | "group"; }; } | - |
parameters.id | string | The ID of the content to check permissions against. |
parameters.operation | "update" | "delete" | "read" | The content permission operation to check. |
parameters.subject | { [key: string]: unknown; identifier: string; type: "user" | "group"; } | - |
parameters.subject.identifier | string | For type=user, identifier should be user's accountId or anonymous for anonymous users For type=group, identifier should be ID of the group |
parameters.subject.type | "user" | "group" | - |
Returns
Promise<{ [key: string]: unknown; _links?: { [key: string]: unknown; base?: string; byOperation?: string; collection?: string; context?: string; download?: string; editui?: string; edituiv2?: string; next?: string; prev?: string; self?: string; tinyui?: string; webui?: string; }; errors?: object[]; hasPermission: boolean; }>