1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-24 08:33:29 +00:00

Removing feature flag from client side (#19070)

This commit is contained in:
cd-bitwarden
2026-02-23 13:48:34 -05:00
committed by GitHub
parent 87d96b6254
commit 435375ab53
2 changed files with 6 additions and 16 deletions

View File

@@ -159,16 +159,14 @@ export class ProductSwitcherService {
this.userHasSingleOrgPolicy$,
this.route.paramMap,
this.triggerProductUpdate$,
this.configService.getFeatureFlag$(FeatureFlag.SM1719_RemoveSecretsManagerAds),
]).pipe(
map(
([orgs, providers, userHasSingleOrgPolicy, paramMap, , removeSecretsManagerAdsFlag]: [
([orgs, providers, userHasSingleOrgPolicy, paramMap]: [
Organization[],
Provider[],
boolean,
ParamMap,
void,
boolean,
]) => {
// Sort orgs by name to match the order within the sidebar
orgs.sort((a, b) => a.name.localeCompare(b.name));
@@ -215,13 +213,11 @@ export class ProductSwitcherService {
};
// Check if SM ads should be disabled for any organization
// SM ads are only disabled if the feature flag is enabled AND
// the user is a regular User (not Admin or Owner) in an organization that has useDisableSMAdsForUsers enabled
const shouldDisableSMAds =
removeSecretsManagerAdsFlag &&
orgs.some(
(org) => org.useDisableSMAdsForUsers === true && org.type === OrganizationUserType.User,
);
// SM ads are disabled if the user is a regular User (not Admin or Owner)
// in an organization that has useDisableSMAdsForUsers enabled
const shouldDisableSMAds = orgs.some(
(org) => org.useDisableSMAdsForUsers === true && org.type === OrganizationUserType.User,
);
const products = {
pm: {

View File

@@ -89,9 +89,6 @@ export enum FeatureFlag {
/* UIF */
RouterFocusManagement = "router-focus-management",
/* Secrets Manager */
SM1719_RemoveSecretsManagerAds = "sm-1719-remove-secrets-manager-ads",
}
export type AllowedFeatureFlagTypes = boolean | number | string;
@@ -187,9 +184,6 @@ export const DefaultFeatureFlagValue = {
/* UIF */
[FeatureFlag.RouterFocusManagement]: FALSE,
/* Secrets Manager */
[FeatureFlag.SM1719_RemoveSecretsManagerAds]: FALSE,
} satisfies Record<FeatureFlag, AllowedFeatureFlagTypes>;
export type DefaultFeatureFlagValueType = typeof DefaultFeatureFlagValue;