1
0
mirror of https://github.com/bitwarden/browser synced 2026-03-01 02:51:24 +00:00

Merge branch 'main' into tools/pm-18793/port-credential-generator-service-to-providers

This commit is contained in:
✨ Audrey ✨
2025-04-01 16:36:44 -04:00
544 changed files with 8197 additions and 6034 deletions

View File

@@ -47,7 +47,7 @@ describe("DefaultGeneratorNavigationService", () => {
describe("evaluator$", () => {
it("emits a GeneratorNavigationEvaluator", async () => {
const policyService = mock<PolicyService>({
getAll$() {
policiesByType$() {
return of([]);
},
});
@@ -62,7 +62,7 @@ describe("DefaultGeneratorNavigationService", () => {
describe("enforcePolicy", () => {
it("applies policy", async () => {
const policyService = mock<PolicyService>({
getAll$(_type: PolicyType, _user: UserId) {
policiesByType$(_type: PolicyType, _user: UserId) {
return of([
new Policy({
id: "" as any,

View File

@@ -41,7 +41,7 @@ export class DefaultGeneratorNavigationService implements GeneratorNavigationSer
* @param userId: Identifies the user making the request
*/
evaluator$(userId: UserId) {
const evaluator$ = this.policy.getAll$(PolicyType.PasswordGenerator, userId).pipe(
const evaluator$ = this.policy.policiesByType$(PolicyType.PasswordGenerator, userId).pipe(
reduceCollection(preferPassword, DisabledGeneratorNavigationPolicy),
distinctIfShallowMatch(),
map((policy) => new GeneratorNavigationEvaluator(policy)),