kalcaddle / kodbox

kodbox is a file manager for web. It is a newly designed product based on kodexplorer. It is also a web code editor, which allows you to develop websites directly within the web browser.You can run kodbox either online or locally,on Linux, Windows or Mac based platforms
https://kodcloud.com
2.18k stars 373 forks source link

插件配置中pluginAuth字段无效 #278

Closed jdysya closed 2 months ago

jdysya commented 2 months ago

如图是在后台插件中心配置选项

image

该配置经调试发现是有效的

image


但是若根据文档-插件配置参考中的描述,将插件目录下的package.json中内容修改如下:

{
  "id": "pluginTest",
  "name": "test",
  "title": "测试 test",
  "version": "1.12",
  "category": "tools",
  "source": {
    "className": "font-icon ri-time-line bg-blue-6"
  },
  "description": "测试插件",
  "auther": {
    "copyright": "jdysya.",
    "homePage": "http://kodbox.test"
  },
  "configItem": {
    "pluginAuth": {
      "type": "userSelect",
      "value": "all:0;user:1;group:1;role:1",
      "display": "使用权限",
      "desc": "指定权限组、用户组、用户的用户可以访问",
      "info": "",
      "require": 1
    }
  }
}

在后台插件中心中则没有变化

image

调试发现,代码中获取到的配置内容也并非package.json中的内容

image image
kalcaddle commented 2 months ago

数据格式改为了json格式,文档未更新,目前已更新.

另外package.json中的配置默认值,是在安装时更新到数据库的,后续修改插件配置后会是修改后的值. 默认值都不再有效.