From 2bda1b12f3362cac5106f7c4fb25e5dbbf4f6baa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=81=E7=81=AB=E8=A1=8C=E8=80=85?= Date: Mon, 13 Sep 2021 17:43:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E5=A4=84=E7=90=86=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E7=AB=AF=E6=8E=A5=E5=8F=A3=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Base/DzqController.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Base/DzqController.php b/src/Base/DzqController.php index 80ca6d6..7319901 100644 --- a/src/Base/DzqController.php +++ b/src/Base/DzqController.php @@ -65,6 +65,12 @@ abstract class DzqController implements RequestHandlerInterface $this->c9IbQHXVFFWu($this->user);//添加辅助函数 $this->dzqLogInit(); + //临时处理管理端接口权限 + if(stristr($this->request->getUri()->getPath(),'backAdmin')){ + if(!$this->user->isAdmin()){ + throw new PermissionDeniedException('没有权限'); + } + } try { if (!$this->checkRequestPermissions(app(UserRepository::class))) { DzqLog::info('dzqController_handle_no_permission', [ -- Gitee