1
0
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:
Kyle Spearrin
2018-07-03 23:33:15 -04:00
parent af43232567
commit ff8c1dfea9
10 changed files with 68 additions and 19 deletions

View File

@@ -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;
}
}

View File

@@ -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);