mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 06:43:35 +00:00
[PM-15149] Remove ssh feature flag (#13506)
* Remove ssh feature flag * Remove isSshKeyENabled in type-filter.component
This commit is contained in:
@@ -27,12 +27,7 @@
|
|||||||
<i class="bwi bwi-sticky-note" slot="start" aria-hidden="true"></i>
|
<i class="bwi bwi-sticky-note" slot="start" aria-hidden="true"></i>
|
||||||
{{ "note" | i18n }}
|
{{ "note" | i18n }}
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a bitMenuItem [routerLink]="['/add-cipher']" [queryParams]="buildQueryParams(cipherType.SshKey)">
|
||||||
bitMenuItem
|
|
||||||
[routerLink]="['/add-cipher']"
|
|
||||||
[queryParams]="buildQueryParams(cipherType.SshKey)"
|
|
||||||
*ngIf="sshKeysEnabled"
|
|
||||||
>
|
|
||||||
<i class="bwi bwi-key" slot="start" aria-hidden="true"></i>
|
<i class="bwi bwi-key" slot="start" aria-hidden="true"></i>
|
||||||
{{ "typeSshKey" | i18n }}
|
{{ "typeSshKey" | i18n }}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ import { Component, Input, OnInit } from "@angular/core";
|
|||||||
import { Router, RouterLink } from "@angular/router";
|
import { Router, RouterLink } from "@angular/router";
|
||||||
|
|
||||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||||
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
|
||||||
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
|
||||||
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
||||||
import { CollectionId, OrganizationId } from "@bitwarden/common/types/guid";
|
import { CollectionId, OrganizationId } from "@bitwarden/common/types/guid";
|
||||||
import { CipherType } from "@bitwarden/common/vault/enums";
|
import { CipherType } from "@bitwarden/common/vault/enums";
|
||||||
@@ -40,13 +38,9 @@ export class NewItemDropdownV2Component implements OnInit {
|
|||||||
constructor(
|
constructor(
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private dialogService: DialogService,
|
private dialogService: DialogService,
|
||||||
private configService: ConfigService,
|
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
sshKeysEnabled = false;
|
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
this.sshKeysEnabled = await this.configService.getFeatureFlag(FeatureFlag.SSHKeyVaultItem);
|
|
||||||
this.tab = await BrowserApi.getTabFromCurrentWindow();
|
this.tab = await BrowserApi.getTabFromCurrentWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -423,7 +423,7 @@
|
|||||||
"enableHardwareAccelerationDesc" | i18n
|
"enableHardwareAccelerationDesc" | i18n
|
||||||
}}</small>
|
}}</small>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" *ngIf="showSshAgentOption">
|
<div class="form-group">
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label for="enableSshAgent">
|
<label for="enableSshAgent">
|
||||||
<input
|
<input
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ import { UserVerificationService as UserVerificationServiceAbstraction } from "@
|
|||||||
import { AutofillSettingsServiceAbstraction } from "@bitwarden/common/autofill/services/autofill-settings.service";
|
import { AutofillSettingsServiceAbstraction } from "@bitwarden/common/autofill/services/autofill-settings.service";
|
||||||
import { DomainSettingsService } from "@bitwarden/common/autofill/services/domain-settings.service";
|
import { DomainSettingsService } from "@bitwarden/common/autofill/services/domain-settings.service";
|
||||||
import { DeviceType } from "@bitwarden/common/enums";
|
import { DeviceType } from "@bitwarden/common/enums";
|
||||||
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
|
||||||
import {
|
import {
|
||||||
VaultTimeout,
|
VaultTimeout,
|
||||||
VaultTimeoutAction,
|
VaultTimeoutAction,
|
||||||
@@ -67,7 +66,6 @@ export class SettingsComponent implements OnInit, OnDestroy {
|
|||||||
showAlwaysShowDock = false;
|
showAlwaysShowDock = false;
|
||||||
requireEnableTray = false;
|
requireEnableTray = false;
|
||||||
showDuckDuckGoIntegrationOption = false;
|
showDuckDuckGoIntegrationOption = false;
|
||||||
showSshAgentOption = false;
|
|
||||||
showOpenAtLoginOption = false;
|
showOpenAtLoginOption = false;
|
||||||
isWindows: boolean;
|
isWindows: boolean;
|
||||||
isLinux: boolean;
|
isLinux: boolean;
|
||||||
@@ -223,7 +221,6 @@ export class SettingsComponent implements OnInit, OnDestroy {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.showSshAgentOption = await this.configService.getFeatureFlag(FeatureFlag.SSHAgent);
|
|
||||||
this.userHasMasterPassword = await this.userVerificationService.hasMasterPassword();
|
this.userHasMasterPassword = await this.userVerificationService.hasMasterPassword();
|
||||||
|
|
||||||
this.isWindows = this.platformUtilsService.getDevice() === DeviceType.WindowsDesktop;
|
this.isWindows = this.platformUtilsService.getDevice() === DeviceType.WindowsDesktop;
|
||||||
|
|||||||
@@ -24,8 +24,6 @@ import {
|
|||||||
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
||||||
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
|
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
|
||||||
import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status";
|
import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status";
|
||||||
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
|
||||||
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
import { CommandDefinition, MessageListener } from "@bitwarden/common/platform/messaging";
|
import { CommandDefinition, MessageListener } from "@bitwarden/common/platform/messaging";
|
||||||
@@ -58,23 +56,13 @@ export class SshAgentService implements OnDestroy {
|
|||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
private i18nService: I18nService,
|
private i18nService: I18nService,
|
||||||
private desktopSettingsService: DesktopSettingsService,
|
private desktopSettingsService: DesktopSettingsService,
|
||||||
private configService: ConfigService,
|
|
||||||
private accountService: AccountService,
|
private accountService: AccountService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async init() {
|
async init() {
|
||||||
this.configService
|
if (!(await ipc.platform.sshAgent.isLoaded())) {
|
||||||
.getFeatureFlag$(FeatureFlag.SSHAgent)
|
await ipc.platform.sshAgent.init();
|
||||||
.pipe(
|
}
|
||||||
concatMap(async (enabled) => {
|
|
||||||
this.isFeatureFlagEnabled = enabled;
|
|
||||||
if (!(await ipc.platform.sshAgent.isLoaded()) && enabled) {
|
|
||||||
await ipc.platform.sshAgent.init();
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
takeUntil(this.destroy$),
|
|
||||||
)
|
|
||||||
.subscribe();
|
|
||||||
|
|
||||||
await this.initListeners();
|
await this.initListeners();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,7 +82,6 @@
|
|||||||
<li
|
<li
|
||||||
class="filter-option"
|
class="filter-option"
|
||||||
[ngClass]="{ active: activeFilter.cipherType === cipherTypeEnum.SshKey }"
|
[ngClass]="{ active: activeFilter.cipherType === cipherTypeEnum.SshKey }"
|
||||||
*ngIf="isSshKeysEnabled"
|
|
||||||
>
|
>
|
||||||
<span class="filter-buttons">
|
<span class="filter-buttons">
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -1,21 +1,13 @@
|
|||||||
import { Component, OnInit } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
|
|
||||||
import { TypeFilterComponent as BaseTypeFilterComponent } from "@bitwarden/angular/vault/vault-filter/components/type-filter.component";
|
import { TypeFilterComponent as BaseTypeFilterComponent } from "@bitwarden/angular/vault/vault-filter/components/type-filter.component";
|
||||||
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
|
||||||
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-type-filter",
|
selector: "app-type-filter",
|
||||||
templateUrl: "type-filter.component.html",
|
templateUrl: "type-filter.component.html",
|
||||||
})
|
})
|
||||||
export class TypeFilterComponent extends BaseTypeFilterComponent implements OnInit {
|
export class TypeFilterComponent extends BaseTypeFilterComponent {
|
||||||
isSshKeysEnabled = false;
|
constructor() {
|
||||||
|
|
||||||
constructor(private configService: ConfigService) {
|
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
async ngOnInit(): Promise<void> {
|
|
||||||
this.isSshKeysEnabled = await this.configService.getFeatureFlag(FeatureFlag.SSHKeyVaultItem);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import { isCardExpired } from "@bitwarden/common/autofill/utils";
|
|||||||
import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service";
|
import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service";
|
||||||
import { ProductTierType } from "@bitwarden/common/billing/enums";
|
import { ProductTierType } from "@bitwarden/common/billing/enums";
|
||||||
import { EventType } from "@bitwarden/common/enums";
|
import { EventType } from "@bitwarden/common/enums";
|
||||||
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
|
||||||
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||||
@@ -107,17 +106,6 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit, On
|
|||||||
await super.ngOnInit();
|
await super.ngOnInit();
|
||||||
await this.load();
|
await this.load();
|
||||||
|
|
||||||
// https://bitwarden.atlassian.net/browse/PM-10413
|
|
||||||
// cannot generate ssh keys so block creation
|
|
||||||
if (
|
|
||||||
this.type === CipherType.SshKey &&
|
|
||||||
this.cipherId == null &&
|
|
||||||
!(await this.configService.getFeatureFlag(FeatureFlag.SSHKeyVaultItem))
|
|
||||||
) {
|
|
||||||
this.type = CipherType.Login;
|
|
||||||
this.cipher.type = CipherType.Login;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.viewOnly = !this.cipher.edit && this.editMode;
|
this.viewOnly = !this.cipher.edit && this.editMode;
|
||||||
// remove when all the title for all clients are updated to New Item
|
// remove when all the title for all clients are updated to New Item
|
||||||
if (this.cloneMode || !this.editMode) {
|
if (this.cloneMode || !this.editMode) {
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import { firstValueFrom, merge, Subject, switchMap, takeUntil } from "rxjs";
|
|||||||
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
||||||
import { PolicyType } from "@bitwarden/common/admin-console/enums";
|
import { PolicyType } from "@bitwarden/common/admin-console/enums";
|
||||||
import { BillingApiServiceAbstraction } from "@bitwarden/common/billing/abstractions/billing-api.service.abstraction";
|
import { BillingApiServiceAbstraction } from "@bitwarden/common/billing/abstractions/billing-api.service.abstraction";
|
||||||
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
|
||||||
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
@@ -247,16 +246,13 @@ export class VaultFilterComponent implements OnInit, OnDestroy {
|
|||||||
type: CipherType.SecureNote,
|
type: CipherType.SecureNote,
|
||||||
icon: "bwi-sticky-note",
|
icon: "bwi-sticky-note",
|
||||||
},
|
},
|
||||||
];
|
{
|
||||||
|
|
||||||
if (await this.configService.getFeatureFlag(FeatureFlag.SSHKeyVaultItem)) {
|
|
||||||
allTypeFilters.push({
|
|
||||||
id: "sshKey",
|
id: "sshKey",
|
||||||
name: this.i18nService.t("typeSshKey"),
|
name: this.i18nService.t("typeSshKey"),
|
||||||
type: CipherType.SshKey,
|
type: CipherType.SshKey,
|
||||||
icon: "bwi-key",
|
icon: "bwi-key",
|
||||||
});
|
},
|
||||||
}
|
];
|
||||||
|
|
||||||
const typeFilterSection: VaultFilterSection = {
|
const typeFilterSection: VaultFilterSection = {
|
||||||
data$: this.vaultFilterService.buildTypeTree(
|
data$: this.vaultFilterService.buildTypeTree(
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import { AccountService } from "@bitwarden/common/auth/abstractions/account.serv
|
|||||||
import { getUserId } from "@bitwarden/common/auth/services/account.service";
|
import { getUserId } from "@bitwarden/common/auth/services/account.service";
|
||||||
import { normalizeExpiryYearFormat } from "@bitwarden/common/autofill/utils";
|
import { normalizeExpiryYearFormat } from "@bitwarden/common/autofill/utils";
|
||||||
import { EventType } from "@bitwarden/common/enums";
|
import { EventType } from "@bitwarden/common/enums";
|
||||||
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
|
||||||
import { UriMatchStrategy } from "@bitwarden/common/models/domain/domain-service";
|
import { UriMatchStrategy } from "@bitwarden/common/models/domain/domain-service";
|
||||||
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
@@ -208,10 +207,7 @@ export class AddEditComponent implements OnInit, OnDestroy {
|
|||||||
this.writeableCollections = await this.loadCollections();
|
this.writeableCollections = await this.loadCollections();
|
||||||
this.canUseReprompt = await this.passwordRepromptService.enabled();
|
this.canUseReprompt = await this.passwordRepromptService.enabled();
|
||||||
|
|
||||||
const sshKeysEnabled = await this.configService.getFeatureFlag(FeatureFlag.SSHKeyVaultItem);
|
this.typeOptions.push({ name: this.i18nService.t("typeSshKey"), value: CipherType.SshKey });
|
||||||
if (sshKeysEnabled) {
|
|
||||||
this.typeOptions.push({ name: this.i18nService.t("typeSshKey"), value: CipherType.SshKey });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
|
|||||||
@@ -30,8 +30,6 @@ export enum FeatureFlag {
|
|||||||
PM4154_BulkEncryptionService = "PM-4154-bulk-encryption-service",
|
PM4154_BulkEncryptionService = "PM-4154-bulk-encryption-service",
|
||||||
VaultBulkManagementAction = "vault-bulk-management-action",
|
VaultBulkManagementAction = "vault-bulk-management-action",
|
||||||
UnauthenticatedExtensionUIRefresh = "unauth-ui-refresh",
|
UnauthenticatedExtensionUIRefresh = "unauth-ui-refresh",
|
||||||
SSHKeyVaultItem = "ssh-key-vault-item",
|
|
||||||
SSHAgent = "ssh-agent",
|
|
||||||
CipherKeyEncryption = "cipher-key-encryption",
|
CipherKeyEncryption = "cipher-key-encryption",
|
||||||
TrialPaymentOptional = "PM-8163-trial-payment",
|
TrialPaymentOptional = "PM-8163-trial-payment",
|
||||||
SecurityTasks = "security-tasks",
|
SecurityTasks = "security-tasks",
|
||||||
@@ -85,8 +83,6 @@ export const DefaultFeatureFlagValue = {
|
|||||||
[FeatureFlag.PM4154_BulkEncryptionService]: FALSE,
|
[FeatureFlag.PM4154_BulkEncryptionService]: FALSE,
|
||||||
[FeatureFlag.VaultBulkManagementAction]: FALSE,
|
[FeatureFlag.VaultBulkManagementAction]: FALSE,
|
||||||
[FeatureFlag.UnauthenticatedExtensionUIRefresh]: FALSE,
|
[FeatureFlag.UnauthenticatedExtensionUIRefresh]: FALSE,
|
||||||
[FeatureFlag.SSHKeyVaultItem]: FALSE,
|
|
||||||
[FeatureFlag.SSHAgent]: FALSE,
|
|
||||||
[FeatureFlag.CipherKeyEncryption]: FALSE,
|
[FeatureFlag.CipherKeyEncryption]: FALSE,
|
||||||
[FeatureFlag.TrialPaymentOptional]: FALSE,
|
[FeatureFlag.TrialPaymentOptional]: FALSE,
|
||||||
[FeatureFlag.SecurityTasks]: FALSE,
|
[FeatureFlag.SecurityTasks]: FALSE,
|
||||||
|
|||||||
Reference in New Issue
Block a user