[AC-1689] Add hidePasswords property to collection data and response models (#6451)

This commit is contained in:
Thomas Rittson 2023-10-03 13:30:24 +10:00 committed by GitHub
parent 32121dabe4
commit 512af1e923
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View File

@ -6,6 +6,7 @@ export class CollectionData {
name: string;
externalId: string;
readOnly: boolean;
hidePasswords: boolean;
constructor(response: CollectionDetailsResponse) {
this.id = response.id;
@ -13,5 +14,6 @@ export class CollectionData {
this.name = response.name;
this.externalId = response.externalId;
this.readOnly = response.readOnly;
this.hidePasswords = response.hidePasswords;
}
}

View File

@ -13,6 +13,7 @@ describe("Collection", () => {
name: "encName",
externalId: "extId",
readOnly: true,
hidePasswords: true,
};
});
@ -39,7 +40,7 @@ describe("Collection", () => {
name: { encryptedString: "encName", encryptionType: 0 },
externalId: "extId",
readOnly: true,
hidePasswords: null,
hidePasswords: true,
});
});

View File

@ -18,10 +18,12 @@ export class CollectionResponse extends BaseResponse {
export class CollectionDetailsResponse extends CollectionResponse {
readOnly: boolean;
hidePasswords: boolean;
constructor(response: any) {
super(response);
this.readOnly = this.getResponseProperty("ReadOnly") || false;
this.hidePasswords = this.getResponseProperty("HidePasswords") || false;
}
}