mirror of
https://github.com/bitwarden/browser
synced 2026-02-25 09:03:28 +00:00
Co-authored-by: cd-bitwarden <106776772+cd-bitwarden@users.noreply.github.com>
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user