{"record":{"id":"6add20d548eece0c","repo":"z-song/laravel-admin","slug":"admin-deny","errorCode":null,"errorMessage":"admin.deny","messagePattern":"admin\\.deny","errorType":"http","errorClass":null,"httpStatus":403,"severity":"error","filePath":"src/Auth/Permission.php","lineNumber":90,"sourceCode":"    {\n        if (static::isAdministrator()) {\n            return true;\n        }\n\n        if (Admin::user()->inRoles($roles)) {\n            static::error();\n        }\n    }\n\n    /**\n     * Send error response page.\n     */\n    public static function error()\n    {\n        $response = response(Admin::content()->withError(trans('admin.deny')));\n\n        if (!request()->pjax() && request()->ajax()) {\n            abort(403, trans('admin.deny'));\n        }\n\n        Pjax::respond($response);\n    }\n\n    /**\n     * If current user is administrator.\n     *\n     * @return mixed\n     */\n    public static function isAdministrator()\n    {\n        return Admin::user()->isRole('administrator');\n    }\n}\n","sourceCodeStart":72,"sourceCodeEnd":106,"githubUrl":"https://github.com/z-song/laravel-admin/blob/67c441eb78ecc5437e59775d89770cd9c2cb1e05/src/Auth/Permission.php#L72-L106","documentation":"Error \"admin.deny\" thrown in z-song/laravel-admin.","triggerScenarios":"Thrown at src/Auth/Permission.php:90 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":"67c441eb78ecc5437e59775d89770cd9c2cb1e05","analyzedAt":"2026-08-21T02:51:03.143Z","schemaVersion":2},"datasetVersion":"2026-08-21T03:17:12.404Z"}