filamentphp/filament · error · LogicException

Strict authorization mode is enabled, but no ability [{$acti

Error message

Strict authorization mode is enabled, but no ability [{$actionValue}] or policy with method [{$actionValue}()] was found for [{$modelName}].

What it means

Error "Strict authorization mode is enabled, but no ability [{$actionValue}] or policy with method [{$actionValue}()] was found for [{$modelName}]." thrown in filamentphp/filament.

Source

Thrown at packages/panels/src/helpers.php:52

        $actionValue = match (true) {
            $action instanceof BackedEnum => $action->value,
            $action instanceof UnitEnum => $action->name,
            default => $action,
        };

        if (! $shouldCheckPolicyExistence) {
            if (
                Filament::isAuthorizationStrict()
                && (! Gate::forUser($user)->has($action))
                && (
                    blank($policyClass = Gate::getPolicyFor($model))
                    || (! method_exists($policyClass, $actionValue))
                )
            ) {
                $modelName = is_string($model) ? $model : $model::class;

                throw new LogicException(blank($policyClass)
                    ? "Strict authorization mode is enabled, but no ability [{$actionValue}] or policy with method [{$actionValue}()] was found for [{$modelName}]."
                    : "Strict authorization mode is enabled, but no ability [{$actionValue}] or [{$actionValue}()] method was found on [{$policyClass}].");
            }

            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,

View on GitHub (pinned to 53483fa934)

When it happens

Trigger: Thrown at packages/panels/src/helpers.php:52 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/986b328bd381bd7a. Report an issue: GitHub.