diff --git a/libs/common/src/services/policy/policy.service.ts b/libs/common/src/services/policy/policy.service.ts index 3dfe345633c..757c3b3e05f 100644 --- a/libs/common/src/services/policy/policy.service.ts +++ b/libs/common/src/services/policy/policy.service.ts @@ -222,11 +222,13 @@ export class PolicyService implements InternalPolicyServiceAbstraction { policies[policy.id] = policy; await this.updateObservables(policies); + await this.stateService.setDecryptedPolicies(null); await this.stateService.setEncryptedPolicies(policies); } async replace(policies: { [id: string]: PolicyData }): Promise { await this.updateObservables(policies); + await this.stateService.setDecryptedPolicies(null); await this.stateService.setEncryptedPolicies(policies); } @@ -234,6 +236,7 @@ export class PolicyService implements InternalPolicyServiceAbstraction { if (userId == null || userId == (await this.stateService.getUserId())) { this._policies.next([]); } + await this.stateService.setDecryptedPolicies(null, { userId: userId }); await this.stateService.setEncryptedPolicies(null, { userId: userId }); }