1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

Implemented Custom role and permissions (#237)

* Implemented Custom role and permissions

* converted Permissions interface into a class

* formatting fix
This commit is contained in:
Addison Beck
2021-01-11 17:01:39 -05:00
committed by GitHub
parent 8d161d9245
commit 6ac6df75d7
10 changed files with 112 additions and 8 deletions

View File

@@ -1,15 +1,18 @@
import { OrganizationUserStatusType } from '../../enums/organizationUserStatusType';
import { OrganizationUserType } from '../../enums/organizationUserType';
import { BaseResponse } from './baseResponse';
import { SelectionReadOnlyResponse } from './selectionReadOnlyResponse';
import { PermissionsApi } from '../api/permissionsApi';
import { OrganizationUserStatusType } from '../../enums/organizationUserStatusType';
import { OrganizationUserType } from '../../enums/organizationUserType';
export class OrganizationUserResponse extends BaseResponse {
id: string;
userId: string;
type: OrganizationUserType;
status: OrganizationUserStatusType;
accessAll: boolean;
permissions: PermissionsApi;
constructor(response: any) {
super(response);
@@ -17,6 +20,7 @@ export class OrganizationUserResponse extends BaseResponse {
this.userId = this.getResponseProperty('UserId');
this.type = this.getResponseProperty('Type');
this.status = this.getResponseProperty('Status');
this.permissions = new PermissionsApi(this.getResponseProperty('Permissions'));
this.accessAll = this.getResponseProperty('AccessAll');
}
}