1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-25 09:03:28 +00:00

Removing feature flag from client side (#19070) (#19154)

Co-authored-by: cd-bitwarden <106776772+cd-bitwarden@users.noreply.github.com>
This commit is contained in:
Vincent Salucci
2026-02-23 14:16:42 -06:00
committed by GitHub
parent d5478ee8d2
commit bfc86b6438
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: {