mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
sync policies., set up policy service
This commit is contained in:
@@ -3,6 +3,7 @@ import { CipherResponse } from './cipherResponse';
|
||||
import { CollectionDetailsResponse } from './collectionResponse';
|
||||
import { DomainsResponse } from './domainsResponse';
|
||||
import { FolderResponse } from './folderResponse';
|
||||
import { PolicyResponse } from './policyResponse';
|
||||
import { ProfileResponse } from './profileResponse';
|
||||
|
||||
export class SyncResponse extends BaseResponse {
|
||||
@@ -11,6 +12,7 @@ export class SyncResponse extends BaseResponse {
|
||||
collections: CollectionDetailsResponse[] = [];
|
||||
ciphers: CipherResponse[] = [];
|
||||
domains?: DomainsResponse;
|
||||
policies?: PolicyResponse[] = [];
|
||||
|
||||
constructor(response: any) {
|
||||
super(response);
|
||||
@@ -39,5 +41,10 @@ export class SyncResponse extends BaseResponse {
|
||||
if (domains != null) {
|
||||
this.domains = new DomainsResponse(domains);
|
||||
}
|
||||
|
||||
const policies = this.getResponseProperty('Policies');
|
||||
if (policies != null) {
|
||||
this.policies = policies.map((p: any) => new PolicyResponse(p));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user