mirror of
https://github.com/bitwarden/clients.git
synced 2026-06-13 21:01:11 +08:00
* Enhance policy service with accepted policies retrieval and update sync response structure - Added `acceptedPolicies$` method to `PolicyService` for fetching policies from organizations where the user has an Accepted membership status. - Updated `DefaultPolicyService` to implement the new `acceptedPolicies$` method. - Modified `DefaultSyncService` to handle a new `policiesNew` property in the sync response, ensuring backward compatibility with existing `policies`. - Updated `SyncResponse` class to include the new `policiesNew` property and its mapping logic. * Add DefaultNewPolicyService and integrate into MainBackground and ServiceContainer - Introduced DefaultNewPolicyService for managing new policy formats. - Updated MainBackground and ServiceContainer to include newPolicyService. - Adjusted sync logic in DefaultSyncService to handle new policies. - Refactored policy service abstractions to accommodate new policy management. - Added tests for new policy service integration. * Add unit tests for DefaultNewPolicyService and enhance policy handling in DefaultPolicyService - Introduced comprehensive tests for DefaultNewPolicyService, covering upsert and replace functionalities. - Added tests to ensure correct filtering of policies based on organization status in DefaultPolicyService. - Enhanced policy synchronization logic in DefaultSyncService to handle new policies effectively. * Refactor NewPolicyService initialization and remove organization dependency - Updated the instantiation of DefaultNewPolicyService in both MainBackground and ServiceContainer to only require StateProvider. - Removed organizationService dependency from DefaultNewPolicyService and its related tests, simplifying the service's interface. - Cleaned up unused code and tests related to organization policies, ensuring the service focuses solely on state management. * Adds use of InternalNewPolicyService to same places InternalPolicyService syncs * Refactor server notifications tests to include InternalNewPolicyService mock and update sync service to handle empty policy sources correctly. * Refactor server notifications tests to import InternalNewPolicyService and InternalPolicyService from their respective paths, improving code clarity and organization. * Update MainBackground and ServiceContainer to use InternalNewPolicyService, enhancing consistency in policy service implementation across the application. |
||
|---|---|---|
| .. | ||
| src | ||
| jest.config.js | ||
| package.json | ||
| project.json | ||
| test.setup.ts | ||
| tsconfig.json | ||
| tsconfig.spec.json | ||