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:
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user