Skip to content

Commit

Permalink
ENG-3124: Nepalizing portero (missing endpoint in nepal) (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gisler authored May 8, 2020
1 parent 270f57b commit fe62dc8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@al/core",
"version": "1.0.9",
"version": "1.0.10",
"description": "Nepal Core",
"main": "./dist/index.cjs.js",
"types": "./dist/index.d.ts",
Expand Down
15 changes: 15 additions & 0 deletions src/aims-client/aims-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,21 @@ export class AIMSClientInstance {
return role as AIMSRole;
}

/**
* Get assigned roles
* GET
* /aims/v1/:account_id/users/:user_id/roles
* "https://api.cloudinsight.alertlogic.com/aims/v1/12345678/users/715A4EC0-9833-4D6E-9C03-A537E3F98D23/roles"
*/
async getAssignedRoles( accountId:string, userId:string ):Promise<AIMSRole[]> {
const roles = await this.client.get({
service_name: this.serviceName,
account_id: accountId,
path: `/users/${userId}/roles`
});
return roles.roles;
}

/**
* List global roles, roles that are shared among all accounts.
* GET
Expand Down

0 comments on commit fe62dc8

Please sign in to comment.