filamentphp/filament · error · LogicException
Strict authorization mode is enabled, but no policy was foun
Error message
Strict authorization mode is enabled, but no policy was found for [{$modelName}]. What it means
Error "Strict authorization mode is enabled, but no policy was found for [{$modelName}]." thrown in filamentphp/filament.
Source
Thrown at packages/panels/src/helpers.php:75
return Gate::forUser($user)->inspect($action, Arr::wrap($model));
}
$policy = Gate::getPolicyFor($model);
if (filled($policy) && method_exists($policy, $actionValue)) {
return Gate::forUser($user)->inspect($action, Arr::wrap($model));
}
if (Filament::isAuthorizationStrict()) {
$policyClass = match (true) {
is_string($policy) => $policy,
is_object($policy) => $policy::class,
default => null,
};
$modelName = is_string($model) ? $model : $model::class;
throw new LogicException(blank($policyClass)
? "Strict authorization mode is enabled, but no policy was found for [{$modelName}]."
: "Strict authorization mode is enabled, but no [{$actionValue}()] method was found on [{$policyClass}].");
}
/** @var bool | Response | null $response */
$response = invade(Gate::forUser($user))->callBeforeCallbacks( /** @phpstan-ignore-line */
$user,
$action,
[$model],
);
if ($response === false) {
return Response::deny();
}
if (! $response instanceof Response) {
return Response::allow();
}View on GitHub (pinned to 53483fa934)
When it happens
Trigger: Thrown at packages/panels/src/helpers.php:75 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of filamentphp/filament@53483fa934 (2026-08-17).
Data as JSON: /api/errors/fe18c263958bcd38.
Report an issue: GitHub.