1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 23:33:31 +00:00

[PM-23306] "Show cards in autofill" is defaulting to on when the setting is enabled (#15534)

* disable card autofill

* Fixed dependency issues
This commit is contained in:
SmithThe4th
2025-07-11 12:50:31 -04:00
committed by GitHub
parent a9c9312bdd
commit 3c6f763233
6 changed files with 75 additions and 43 deletions

View File

@@ -752,11 +752,6 @@ export default class MainBackground {
this.stateProvider,
);
this.autofillSettingsService = new AutofillSettingsService(
this.stateProvider,
this.policyService,
this.accountService,
);
this.badgeSettingsService = new BadgeSettingsService(this.stateProvider);
this.policyApiService = new PolicyApiService(
this.policyService,
@@ -844,16 +839,6 @@ export default class MainBackground {
this.tokenService,
);
this.billingAccountProfileStateService = new DefaultBillingAccountProfileStateService(
this.stateProvider,
this.platformUtilsService,
this.apiService,
);
this.ssoLoginService = new SsoLoginService(this.stateProvider, this.logService);
this.userVerificationApiService = new UserVerificationApiService(this.apiService);
this.configApiService = new ConfigApiService(this.apiService, this.tokenService);
this.configService = new DefaultConfigService(
@@ -864,6 +849,30 @@ export default class MainBackground {
this.authService,
);
this.billingAccountProfileStateService = new DefaultBillingAccountProfileStateService(
this.stateProvider,
this.platformUtilsService,
this.apiService,
);
this.restrictedItemTypesService = new RestrictedItemTypesService(
this.configService,
this.accountService,
this.organizationService,
this.policyService,
);
this.autofillSettingsService = new AutofillSettingsService(
this.stateProvider,
this.policyService,
this.accountService,
this.restrictedItemTypesService,
);
this.ssoLoginService = new SsoLoginService(this.stateProvider, this.logService);
this.userVerificationApiService = new UserVerificationApiService(this.apiService);
this.domainSettingsService = new DefaultDomainSettingsService(
this.stateProvider,
this.configService,
@@ -928,7 +937,10 @@ export default class MainBackground {
this.i18nService,
);
this.vaultSettingsService = new VaultSettingsService(this.stateProvider);
this.vaultSettingsService = new VaultSettingsService(
this.stateProvider,
this.restrictedItemTypesService,
);
this.vaultTimeoutService = new VaultTimeoutService(
this.accountService,
@@ -1315,13 +1327,6 @@ export default class MainBackground {
this.stateProvider,
);
this.restrictedItemTypesService = new RestrictedItemTypesService(
this.configService,
this.accountService,
this.organizationService,
this.policyService,
);
this.mainContextMenuHandler = new MainContextMenuHandler(
this.stateService,
this.autofillSettingsService,

View File

@@ -118,6 +118,7 @@ import {
InternalFolderService,
} from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
import { TotpService as TotpServiceAbstraction } from "@bitwarden/common/vault/abstractions/totp.service";
import { RestrictedItemTypesService } from "@bitwarden/common/vault/services/restricted-item-types.service";
import { TotpService } from "@bitwarden/common/vault/services/totp.service";
import {
AnonLayoutWrapperDataService,
@@ -486,7 +487,7 @@ const safeProviders: SafeProvider[] = [
safeProvider({
provide: AutofillSettingsServiceAbstraction,
useClass: AutofillSettingsService,
deps: [StateProvider, PolicyService, AccountService],
deps: [StateProvider, PolicyService, AccountService, RestrictedItemTypesService],
}),
safeProvider({
provide: UserNotificationSettingsServiceAbstraction,

View File

@@ -685,11 +685,23 @@ export class ServiceContainer {
this.configService,
);
this.restrictedItemTypesService = new RestrictedItemTypesService(
this.configService,
this.accountService,
this.organizationService,
this.policyService,
);
this.cliRestrictedItemTypesService = new CliRestrictedItemTypesService(
this.restrictedItemTypesService,
);
// FIXME: CLI does not support autofill
this.autofillSettingsService = new AutofillSettingsService(
this.stateProvider,
this.policyService,
this.accountService,
this.restrictedItemTypesService,
);
this.cipherEncryptionService = new DefaultCipherEncryptionService(
@@ -796,17 +808,6 @@ export class ServiceContainer {
this.totpService = new TotpService(this.sdkService);
this.restrictedItemTypesService = new RestrictedItemTypesService(
this.configService,
this.accountService,
this.organizationService,
this.policyService,
);
this.cliRestrictedItemTypesService = new CliRestrictedItemTypesService(
this.restrictedItemTypesService,
);
this.importApiService = new ImportApiService(this.apiService);
this.importService = new ImportService(