fix(security): skip loading security rules if disabled

This commit is contained in:
2026-09-20 15:52:25 +02:00
parent 87eaa9e18c
commit 817b781c88
2 changed files with 12 additions and 0 deletions
+3
View File
@@ -25,6 +25,9 @@ func RegisterSecurityHooks(handler *Handler, securityList *security.SecurityList
// Hook 1: BeforeRead - Load security rules
handler.Hooks().Register(BeforeRead, func(hookCtx *HookContext) error {
secCtx := newSecurityContext(hookCtx)
if security.IsModelSecurityDisabled(secCtx) {
return nil
}
return security.LoadSecurityRules(secCtx, securityList)
})