1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 00:03:56 +00:00

[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
21 changed files with 24 additions and 51 deletions

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 {