mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +00:00
Add support for collections with hide passwords
This commit is contained in:
@@ -22,6 +22,7 @@ export class CipherResponse extends BaseResponse {
|
||||
secureNote: SecureNoteApi;
|
||||
favorite: boolean;
|
||||
edit: boolean;
|
||||
viewPassword: boolean;
|
||||
organizationUseTotp: boolean;
|
||||
revisionDate: string;
|
||||
attachments: AttachmentResponse[];
|
||||
@@ -38,7 +39,12 @@ export class CipherResponse extends BaseResponse {
|
||||
this.name = this.getResponseProperty('Name');
|
||||
this.notes = this.getResponseProperty('Notes');
|
||||
this.favorite = this.getResponseProperty('Favorite') || false;
|
||||
this.edit = this.getResponseProperty('Edit') || true;
|
||||
this.edit = !!this.getResponseProperty('Edit');
|
||||
if (this.getResponseProperty('ViewPassword') == null) {
|
||||
this.viewPassword = true;
|
||||
} else {
|
||||
this.viewPassword = this.getResponseProperty('ViewPassword');
|
||||
}
|
||||
this.organizationUseTotp = this.getResponseProperty('OrganizationUseTotp');
|
||||
this.revisionDate = this.getResponseProperty('RevisionDate');
|
||||
this.collectionIds = this.getResponseProperty('CollectionIds');
|
||||
|
||||
@@ -3,10 +3,12 @@ import { BaseResponse } from './baseResponse';
|
||||
export class SelectionReadOnlyResponse extends BaseResponse {
|
||||
id: string;
|
||||
readOnly: boolean;
|
||||
hidePasswords: boolean;
|
||||
|
||||
constructor(response: any) {
|
||||
super(response);
|
||||
this.id = this.getResponseProperty('Id');
|
||||
this.readOnly = this.getResponseProperty('ReadOnly');
|
||||
this.hidePasswords = this.getResponseProperty('HidePasswords');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user