{"record":{"id":"fe18c263958bcd38","repo":"filamentphp/filament","slug":"strict-authorization-mode-is-enabled-but-no-polic","errorCode":null,"errorMessage":"Strict authorization mode is enabled, but no policy was found for [{$modelName}].","messagePattern":"Strict authorization mode is enabled, but no policy was found for \\[(.+?)\\]\\.","errorType":"exception","errorClass":"LogicException","httpStatus":null,"severity":"error","filePath":"packages/panels/src/helpers.php","lineNumber":75,"sourceCode":"            return Gate::forUser($user)->inspect($action, Arr::wrap($model));\n        }\n\n        $policy = Gate::getPolicyFor($model);\n\n        if (filled($policy) && method_exists($policy, $actionValue)) {\n            return Gate::forUser($user)->inspect($action, Arr::wrap($model));\n        }\n\n        if (Filament::isAuthorizationStrict()) {\n            $policyClass = match (true) {\n                is_string($policy) => $policy,\n                is_object($policy) => $policy::class,\n                default => null,\n            };\n\n            $modelName = is_string($model) ? $model : $model::class;\n\n            throw new LogicException(blank($policyClass)\n                ? \"Strict authorization mode is enabled, but no policy was found for [{$modelName}].\"\n                : \"Strict authorization mode is enabled, but no [{$actionValue}()] method was found on [{$policyClass}].\");\n        }\n\n        /** @var bool | Response | null $response */\n        $response = invade(Gate::forUser($user))->callBeforeCallbacks( /** @phpstan-ignore-line */\n            $user,\n            $action,\n            [$model],\n        );\n\n        if ($response === false) {\n            return Response::deny();\n        }\n\n        if (! $response instanceof Response) {\n            return Response::allow();\n        }","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/filamentphp/filament/blob/53483fa9340e4ec637985fe454ebb58afb92ea24/packages/panels/src/helpers.php#L57-L93","documentation":"Error \"Strict authorization mode is enabled, but no policy was found for [{$modelName}].\" thrown in filamentphp/filament.","triggerScenarios":"Thrown at packages/panels/src/helpers.php:75 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"53483fa9340e4ec637985fe454ebb58afb92ea24","analyzedAt":"2026-08-17T02:06:23.049Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}