-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathall.ts
More file actions
28 lines (20 loc) · 939 Bytes
/
all.ts
File metadata and controls
28 lines (20 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import BaseCommand from "../../../extensions/base-command.js";
export default class ListAllPermissions extends BaseCommand {
static description = 'List all iTwin permissions.';
static examples = [
{
command: `<%= config.bin %> <%= command.id %>`,
description: 'Example 1:'
}
];
async run() {
await this.parse(ListAllPermissions);
const client = await this.getAccessControlApiClient();
const response = await client.getAllAvailableiTwinPermissions();
return this.logAndReturnResult(response.permissions);
}
}