[SM-1031] Remove SecretsManager & showDDG compile flags (#8610)

Remove old compile flags which should no longer be required, and may even cause issues. secretsManager: false hides the app switcher which is now used for more than just secrets manager.
This commit is contained in:
Oscar Hinton 2024-04-08 17:46:24 +02:00 committed by GitHub
parent d1a0a20daa
commit 7064b595da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
21 changed files with 24 additions and 51 deletions

View File

@ -38,9 +38,7 @@ const config: StorybookConfig = {
},
env: (config) => ({
...config,
FLAGS: JSON.stringify({
secretsManager: true,
}),
FLAGS: JSON.stringify({}),
}),
webpackFinal: async (config, { configType }) => {
if (config.resolve) {

View File

@ -11,13 +11,13 @@ import { GroupPolicyEnvironment } from "../admin-console/types/group-policy-envi
import { BrowserApi } from "./browser/browser-api";
// required to avoid linting errors when there are no flags
/* eslint-disable-next-line @typescript-eslint/ban-types */
// eslint-disable-next-line @typescript-eslint/ban-types
export type Flags = {
accountSwitching?: boolean;
} & SharedFlags;
// required to avoid linting errors when there are no flags
/* eslint-disable-next-line @typescript-eslint/ban-types */
// eslint-disable-next-line @typescript-eslint/ban-types
export type DevFlags = {
storeSessionDecrypted?: boolean;
managedEnvironment?: GroupPolicyEnvironment;

View File

@ -7,11 +7,11 @@ import {
} from "@bitwarden/common/platform/misc/flags";
// required to avoid linting errors when there are no flags
/* eslint-disable-next-line @typescript-eslint/ban-types */
// eslint-disable-next-line @typescript-eslint/ban-types
export type Flags = {} & SharedFlags;
// required to avoid linting errors when there are no flags
/* eslint-disable-next-line @typescript-eslint/ban-types */
// eslint-disable-next-line @typescript-eslint/ban-types
export type DevFlags = {} & SharedDevFlags;
export function flagEnabled(flag: keyof Flags): boolean {

View File

@ -1,7 +1,6 @@
{
"devFlags": {},
"flags": {
"showDDGSetting": true,
"enableCipherKeyEncryption": false
}
}

View File

@ -1,6 +1,5 @@
{
"flags": {
"showDDGSetting": true,
"enableCipherKeyEncryption": false
}
}

View File

@ -24,7 +24,6 @@ import { DialogService } from "@bitwarden/components";
import { SetPinComponent } from "../../auth/components/set-pin.component";
import { DesktopAutofillSettingsService } from "../../autofill/services/desktop-autofill-settings.service";
import { flagEnabled } from "../../platform/flags";
import { DesktopSettingsService } from "../../platform/services/desktop-settings.service";
@Component({
@ -146,7 +145,7 @@ export class SettingsComponent implements OnInit {
this.startToTrayDescText = this.i18nService.t(startToTrayKey + "Desc");
// DuckDuckGo browser is only for macos initially
this.showDuckDuckGoIntegrationOption = flagEnabled("showDDGSetting") && isMac;
this.showDuckDuckGoIntegrationOption = isMac;
this.vaultTimeoutOptions = [
// { name: i18nService.t('immediately'), value: 0 },

View File

@ -7,13 +7,11 @@ import {
} from "@bitwarden/common/platform/misc/flags";
// required to avoid linting errors when there are no flags
/* eslint-disable-next-line @typescript-eslint/ban-types */
export type Flags = {
showDDGSetting?: boolean;
} & SharedFlags;
// eslint-disable-next-line @typescript-eslint/ban-types
export type Flags = {} & SharedFlags;
// required to avoid linting errors when there are no flags
/* eslint-disable-next-line @typescript-eslint/ban-types */
// eslint-disable-next-line @typescript-eslint/ban-types
export type DevFlags = {} & SharedDevFlags;
export function flagEnabled(flag: keyof Flags): boolean {

View File

@ -11,7 +11,6 @@
"allowedHosts": "auto"
},
"flags": {
"secretsManager": false,
"showPasswordless": false,
"enableCipherKeyEncryption": false
}

View File

@ -17,7 +17,6 @@
"proxyNotifications": "https://notifications.bitwarden.com"
},
"flags": {
"secretsManager": true,
"showPasswordless": true,
"enableCipherKeyEncryption": false
}

View File

@ -20,7 +20,6 @@
}
],
"flags": {
"secretsManager": true,
"showPasswordless": true,
"enableCipherKeyEncryption": false
},

View File

@ -11,7 +11,6 @@
"buttonAction": "https://www.paypal.com/cgi-bin/webscr"
},
"flags": {
"secretsManager": true,
"showPasswordless": true,
"enableCipherKeyEncryption": false
}

View File

@ -21,7 +21,6 @@
}
],
"flags": {
"secretsManager": true,
"showPasswordless": true
}
}

View File

@ -27,7 +27,6 @@
}
],
"flags": {
"secretsManager": true,
"showPasswordless": true,
"enableCipherKeyEncryption": false
}

View File

@ -7,7 +7,6 @@
"port": 8081
},
"flags": {
"secretsManager": true,
"showPasswordless": true,
"enableCipherKeyEncryption": false
}

View File

@ -5,7 +5,6 @@
"scim": "https://scim.usdev.bitwarden.pw"
},
"flags": {
"secretsManager": true,
"showPasswordless": true
}
}

View File

@ -52,7 +52,6 @@ import { Collection } from "@bitwarden/common/vault/models/domain/collection";
import { CollectionDetailsResponse } from "@bitwarden/common/vault/models/response/collection.response";
import { DialogService, SimpleDialogOptions } from "@bitwarden/components";
import { flagEnabled } from "../../../../utils/flags";
import { openEntityEventsDialog } from "../../../admin-console/organizations/manage/entity-events.component";
import { BasePeopleComponent } from "../../common/base.people.component";
import { GroupService } from "../core";
@ -148,9 +147,7 @@ export class PeopleComponent
shareReplay({ refCount: true, bufferSize: 1 }),
);
this.canUseSecretsManager$ = organization$.pipe(
map((org) => org.useSecretsManager && flagEnabled("secretsManager")),
);
this.canUseSecretsManager$ = organization$.pipe(map((org) => org.useSecretsManager));
const policies$ = organization$.pipe(
switchMap((organization) => {

View File

@ -1,10 +1,8 @@
<ng-template [ngIf]="isEnabled">
<button
type="button"
bitIconButton="bwi bwi-fw bwi-filter"
[bitMenuTriggerFor]="content?.menu"
[buttonType]="buttonType"
[attr.aria-label]="'switchProducts' | i18n"
></button>
<product-switcher-content #content></product-switcher-content>
</ng-template>
<button
type="button"
bitIconButton="bwi bwi-fw bwi-filter"
[bitMenuTriggerFor]="content?.menu"
[buttonType]="buttonType"
[attr.aria-label]="'switchProducts' | i18n"
></button>
<product-switcher-content #content></product-switcher-content>

View File

@ -1,16 +1,11 @@
import { AfterViewInit, ChangeDetectorRef, Component, Input } from "@angular/core";
import { IconButtonType } from "@bitwarden/components/src/icon-button/icon-button.component";
import { flagEnabled } from "../../../utils/flags";
@Component({
selector: "product-switcher",
templateUrl: "./product-switcher.component.html",
})
export class ProductSwitcherComponent implements AfterViewInit {
protected isEnabled = flagEnabled("secretsManager");
/**
* Passed to the product switcher's `bitIconButton`
*/

View File

@ -7,14 +7,13 @@ import {
} from "@bitwarden/common/platform/misc/flags";
// required to avoid linting errors when there are no flags
/* eslint-disable-next-line @typescript-eslint/ban-types */
// eslint-disable-next-line @typescript-eslint/ban-types
export type Flags = {
secretsManager?: boolean;
showPasswordless?: boolean;
} & SharedFlags;
// required to avoid linting errors when there are no flags
/* eslint-disable-next-line @typescript-eslint/ban-types */
// eslint-disable-next-line @typescript-eslint/ban-types
export type DevFlags = {} & SharedDevFlags;
export function flagEnabled(flag: keyof Flags): boolean {

View File

@ -2,7 +2,6 @@ import { NgModule } from "@angular/core";
import { RouterModule, Routes } from "@angular/router";
import { AuthGuard } from "@bitwarden/angular/auth/guards";
import { buildFlaggedRoute } from "@bitwarden/web-vault/app/oss-routing.module";
import { organizationEnabledGuard } from "./guards/sm-org-enabled.guard";
import { canActivateSM } from "./guards/sm.guard";
@ -17,7 +16,7 @@ import { OrgSuspendedComponent } from "./shared/org-suspended.component";
import { TrashModule } from "./trash/trash.module";
const routes: Routes = [
buildFlaggedRoute("secretsManager", {
{
path: "",
children: [
{
@ -86,7 +85,7 @@ const routes: Routes = [
],
},
],
}),
},
];
@NgModule({

View File

@ -1,5 +1,5 @@
// required to avoid linting errors when there are no flags
/* eslint-disable @typescript-eslint/ban-types */
// eslint-disable-next-line @typescript-eslint/ban-types
export type SharedFlags = {
multithreadDecryption: boolean;
showPasswordless?: boolean;
@ -7,7 +7,7 @@ export type SharedFlags = {
};
// required to avoid linting errors when there are no flags
/* eslint-disable @typescript-eslint/ban-types */
// eslint-disable-next-line @typescript-eslint/ban-types
export type SharedDevFlags = {
noopNotifications: boolean;
};