{"version":"2.1.213","anchor":"hook-system-policysettings-source","canonical_anchor":"hook-system-policysettings-source","heading":"Hook System: policySettings Source","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.213\/e\/hook-system-policysettings-source","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.213","markdown":"### Hook System: `policySettings` Source\n\n**What**\n\nA new hook source type `policySettings` is recognized in the hook source registry. It joins `userSettings`, `projectSettings`, `localSettings`, `pluginHook`, `sessionHook`, and `builtinHook`.\n\n**Details**\n\n- Represents enterprise managed settings delivered out-of-band by an administrator; displayed to users as `\"managed\"` (short), `\"Managed\"` (header), and `\"enterprise managed settings\"` (long form) in the settings\/hooks UI\n- Unlike `userSettings`, `projectSettings`, and `localSettings`, `policySettings` is always included in the allowed sources list regardless of the `--allow-setting-source` CLI flag (it is force-added alongside `flagSettings` in the source filter)\n- `policySettings.disableAllHooks = true` disables all hooks entirely \u2014 even plugin hooks \u2014 across all sources\n- `policySettings.allowManagedHooksOnly = true` restricts hook execution to only `policySettings.hooks`; user, project, and local hooks are silently ignored for the session\n- If `qi().disableAllHooks` is `true` but `policySettings.disableAllHooks` is not `true`, hooks from managed settings still run (the setting overrides only non-managed hooks)\n- Hooks declared under `policySettings.hooks` are therefore the only hooks an administrator can guarantee will always run; user-side hooks can be suppressed without touching the user's own settings files\n- In hook priority sorting, hooks sourced from `policySettings` share bucket 999 with `pluginHook` and `builtinHook`, making them sort after user\/project\/local hooks in the display\n\n**Evidence**\n\nHook source labels (search for `\"policySettings\"` in hook source map at new `TJt` variable); hook resolution logic (search for `Lzi`, `iOe`, `QX`, `allowManagedHooksOnly`, `disableAllHooks`)"}