mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-21 11:35:34 +01:00
Add manage property to synced Collection data
This commit is contained in:
parent
a64ae699ce
commit
65cd39589c
@ -6,6 +6,7 @@ export class CollectionData {
|
|||||||
name: string;
|
name: string;
|
||||||
externalId: string;
|
externalId: string;
|
||||||
readOnly: boolean;
|
readOnly: boolean;
|
||||||
|
manage: boolean;
|
||||||
|
|
||||||
constructor(response: CollectionDetailsResponse) {
|
constructor(response: CollectionDetailsResponse) {
|
||||||
this.id = response.id;
|
this.id = response.id;
|
||||||
@ -13,5 +14,6 @@ export class CollectionData {
|
|||||||
this.name = response.name;
|
this.name = response.name;
|
||||||
this.externalId = response.externalId;
|
this.externalId = response.externalId;
|
||||||
this.readOnly = response.readOnly;
|
this.readOnly = response.readOnly;
|
||||||
|
this.manage = response.manage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ export class Collection extends Domain {
|
|||||||
externalId: string;
|
externalId: string;
|
||||||
readOnly: boolean;
|
readOnly: boolean;
|
||||||
hidePasswords: boolean;
|
hidePasswords: boolean;
|
||||||
|
manage: boolean;
|
||||||
|
|
||||||
constructor(obj?: CollectionData) {
|
constructor(obj?: CollectionData) {
|
||||||
super();
|
super();
|
||||||
@ -27,8 +28,9 @@ export class Collection extends Domain {
|
|||||||
externalId: null,
|
externalId: null,
|
||||||
readOnly: null,
|
readOnly: null,
|
||||||
hidePasswords: null,
|
hidePasswords: null,
|
||||||
|
manage: null,
|
||||||
},
|
},
|
||||||
["id", "organizationId", "externalId", "readOnly", "hidePasswords"]
|
["id", "organizationId", "externalId", "readOnly", "hidePasswords", "manage"]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,10 +18,12 @@ export class CollectionResponse extends BaseResponse {
|
|||||||
|
|
||||||
export class CollectionDetailsResponse extends CollectionResponse {
|
export class CollectionDetailsResponse extends CollectionResponse {
|
||||||
readOnly: boolean;
|
readOnly: boolean;
|
||||||
|
manage: boolean;
|
||||||
|
|
||||||
constructor(response: any) {
|
constructor(response: any) {
|
||||||
super(response);
|
super(response);
|
||||||
this.readOnly = this.getResponseProperty("ReadOnly") || false;
|
this.readOnly = this.getResponseProperty("ReadOnly") || false;
|
||||||
|
this.manage = this.getResponseProperty("Manage") || false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ export class CollectionView implements View, ITreeNodeObject {
|
|||||||
externalId: string = null;
|
externalId: string = null;
|
||||||
readOnly: boolean = null;
|
readOnly: boolean = null;
|
||||||
hidePasswords: boolean = null;
|
hidePasswords: boolean = null;
|
||||||
|
manage: boolean = null;
|
||||||
|
|
||||||
constructor(c?: Collection | CollectionAccessDetailsResponse) {
|
constructor(c?: Collection | CollectionAccessDetailsResponse) {
|
||||||
if (!c) {
|
if (!c) {
|
||||||
@ -24,6 +25,7 @@ export class CollectionView implements View, ITreeNodeObject {
|
|||||||
if (c instanceof Collection) {
|
if (c instanceof Collection) {
|
||||||
this.readOnly = c.readOnly;
|
this.readOnly = c.readOnly;
|
||||||
this.hidePasswords = c.hidePasswords;
|
this.hidePasswords = c.hidePasswords;
|
||||||
|
this.manage = c.manage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user