Browse Source

接口检测权限

lizhen_gitee 1 month ago
parent
commit
076e2602f8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      application/common/controller/Api.php

+ 2 - 2
application/common/controller/Api.php

@@ -130,12 +130,12 @@ class Api
                 $this->error(__('Please login first'), null, 401);
             }
             // 判断是否需要验证权限
-            if (!$this->auth->match($this->noNeedRight)) {
+            /*if (!$this->auth->match($this->noNeedRight)) {
                 // 判断控制器和方法判断是否有对应权限
                 if (!$this->auth->check($path)) {
                     $this->error(__('You have no permission'), null, 403);
                 }
-            }
+            }*/
         } else {
             // 如果有传递token才验证是否登录状态
             if ($token) {