فهرست منبع

修复权限问题

Anyon 4 سال پیش
والد
کامیت
a93730639c

+ 4 - 4
vendor/composer/installed.json

@@ -941,12 +941,12 @@
         "source": {
             "type": "git",
             "url": "https://github.com/zoujingli/ThinkLibrary.git",
-            "reference": "b34dc9c54a212b3f44b4231eec2218c8da1b98c1"
+            "reference": "4871a421983c89e92e220ae9a30152b6cd6c4504"
         },
         "dist": {
             "type": "zip",
-            "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/b34dc9c54a212b3f44b4231eec2218c8da1b98c1",
-            "reference": "b34dc9c54a212b3f44b4231eec2218c8da1b98c1",
+            "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/4871a421983c89e92e220ae9a30152b6cd6c4504",
+            "reference": "4871a421983c89e92e220ae9a30152b6cd6c4504",
             "shasum": "",
             "mirrors": [
                 {
@@ -963,7 +963,7 @@
             "ext-mbstring": "*",
             "topthink/framework": "^6.0"
         },
-        "time": "2020-10-29T02:59:49+00:00",
+        "time": "2020-10-29T06:49:03+00:00",
         "type": "library",
         "extra": {
             "think": {

+ 1 - 1
vendor/services.php

@@ -1,5 +1,5 @@
 <?php 
-// This file is automatically generated at:2020-10-29 11:05:01
+// This file is automatically generated at:2020-10-29 14:53:08
 declare (strict_types = 1);
 return array (
   0 => 'think\\admin\\Library',

+ 1 - 1
vendor/zoujingli/think-library/src/Library.php

@@ -41,7 +41,7 @@ class Library extends Service
     /**
      * 版本号
      */
-    const VERSION = '6.0.18';
+    const VERSION = '6.0.19';
 
     /**
      * 启动服务

+ 6 - 5
vendor/zoujingli/think-library/src/service/NodeService.php

@@ -48,16 +48,17 @@ class NodeService extends Service
     public function getCurrent(string $type = ''): string
     {
         $prefix = $this->app->http->getName();
-        if (preg_match("|\\\\addons\\\\{$prefix}$|", $this->app->getNamespace())) {
-            $prefix = "addons-{$this->app->http->getName()}";
+        $namespace = $this->app->getNamespace();
+        if (preg_match("|\\\\addons\\\\{$prefix}$|", $namespace)) {
+            $prefix = "addons-{$prefix}";
         }
         // 获取应用前缀节点
         if ($type === 'module') return $prefix;
         // 获取控制器前缀节点
-        $middle = '\\' . $this->nameTolower($this->app->request->controller());
-        if ($type === 'controller') return $prefix . $middle;
+        $middle = $this->nameTolower($this->app->request->controller());
+        if ($type === 'controller') return $prefix . '/' . $middle;
         // 获取完整的权限节点
-        return strtolower(strtr($prefix . $middle . $this->app->request->action(), '\\', '/'));
+        return $prefix . '/' . $middle . '/' . strtolower($this->app->request->action());
     }
 
     /**

+ 4 - 4
vendor/zoujingli/think-library/src/service/SystemService.php

@@ -331,10 +331,10 @@ class SystemService extends Service
      */
     public function doInit(?\think\App $app = null): void
     {
-        if (is_null($app)) $app = new App();
-        $http = $app->debug($this->isDebug())->http;
-        ($response = $http->run())->send();
-        $http->end($response);
+        $this->app = $app ?: $this->app;
+        $this->app->debug($this->isDebug());
+        ($response = $this->app->http->run())->send();
+        $this->app->http->end($response);
     }
 
     /**