@hasPolicy filter should include advanced settings (#276494)

This commit is contained in:
Sandeep Somavarapu
2025-11-10 15:06:21 +01:00
committed by GitHub
parent fa3fd970b6
commit 39d140db4b

View File

@@ -360,7 +360,8 @@ export class SettingsEditor2 extends EditorPane {
* Returns true if: * Returns true if:
* - The setting is not tagged as advanced, OR * - The setting is not tagged as advanced, OR
* - The setting matches an ID filter (@id:settingKey), OR * - The setting matches an ID filter (@id:settingKey), OR
* - The setting key appears in the search query * - The setting key appears in the search query, OR
* - The @hasPolicy filter is active (policy settings should always be shown when filtering by policy)
*/ */
private shouldShowSetting(setting: ISetting): boolean { private shouldShowSetting(setting: ISetting): boolean {
if (!setting.tags?.includes(ADVANCED_SETTING_TAG)) { if (!setting.tags?.includes(ADVANCED_SETTING_TAG)) {
@@ -372,6 +373,9 @@ export class SettingsEditor2 extends EditorPane {
if (this.viewState.query?.toLowerCase().includes(setting.key.toLowerCase())) { if (this.viewState.query?.toLowerCase().includes(setting.key.toLowerCase())) {
return true; return true;
} }
if (this.viewState.tagFilters?.has(POLICY_SETTING_TAG)) {
return true;
}
return false; return false;
} }