mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 16:53:34 +00:00
org vault listing from apis
This commit is contained in:
@@ -21,4 +21,15 @@ export class Organization {
|
||||
this.type = obj.type;
|
||||
this.enabled = obj.enabled;
|
||||
}
|
||||
|
||||
get canAccess() {
|
||||
if (this.type === OrganizationUserType.Owner) {
|
||||
return true;
|
||||
}
|
||||
return this.enabled && this.status === OrganizationUserStatusType.Confirmed;
|
||||
}
|
||||
|
||||
get isAdmin() {
|
||||
return this.type === OrganizationUserType.Owner || this.type === OrganizationUserType.Admin;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,12 +28,12 @@ export class CipherResponse {
|
||||
constructor(response: any) {
|
||||
this.id = response.Id;
|
||||
this.organizationId = response.OrganizationId;
|
||||
this.folderId = response.FolderId;
|
||||
this.folderId = response.FolderId || null;
|
||||
this.type = response.Type;
|
||||
this.name = response.Name;
|
||||
this.notes = response.Notes;
|
||||
this.favorite = response.Favorite;
|
||||
this.edit = response.Edit;
|
||||
this.favorite = response.Favorite || false;
|
||||
this.edit = response.Edit || true;
|
||||
this.organizationUseTotp = response.OrganizationUseTotp;
|
||||
this.revisionDate = new Date(response.RevisionDate);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user