()
| 60 | * cannot disable managed hooks, so they effectively become managed-only) |
| 61 | */ |
| 62 | export function shouldAllowManagedHooksOnly(): boolean { |
| 63 | const policySettings = settingsModule.getSettingsForSource('policySettings') |
| 64 | if (policySettings?.allowManagedHooksOnly === true) { |
| 65 | return true |
| 66 | } |
| 67 | // If disableAllHooks is set but NOT from managed settings, |
| 68 | // treat as managed-only (non-managed hooks disabled, managed hooks still run) |
| 69 | if ( |
| 70 | settingsModule.getSettings_DEPRECATED().disableAllHooks === true && |
| 71 | policySettings?.disableAllHooks !== true |
| 72 | ) { |
| 73 | return true |
| 74 | } |
| 75 | return false |
| 76 | } |
| 77 | |
| 78 | /** |
| 79 | * Check if all hooks (including managed) should be disabled. |
no outgoing calls
no test coverage detected