From 30afeb0a9954a5c1be07259e52205f8a8243af3f Mon Sep 17 00:00:00 2001 From: chenos Date: Wed, 2 Nov 2022 17:06:35 +0800 Subject: [PATCH] feat: update docs --- README.zh-CN.md | 6 +++--- .../welcome/getting-started/installation/git-clone.md | 2 +- .../en-US/welcome/getting-started/upgrading/git-clone.md | 2 +- .../welcome/getting-started/installation/git-clone.md | 2 +- packages/core/server/src/plugin-manager/PluginManager.ts | 9 +-------- 5 files changed, 7 insertions(+), 14 deletions(-) diff --git a/README.zh-CN.md b/README.zh-CN.md index c171f3a03..b52a6624a 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -70,14 +70,14 @@ NocoBase 采用插件化架构,所有新功能都可以通过开发和安装 NocoBase 支持三种安装方式: -- Docker 安装(推荐) +- Docker 安装(推荐) 适合无代码场景,不需要写代码。升级时,下载最新镜像并重启即可。 -- create-nocobase-app 安装 +- create-nocobase-app 安装 项目的业务代码完全独立,支持低代码开发。 -- Git 源码安装 +- Git 源码安装 如果你想体验最新未发布版本,或者想参与贡献,需要在源码上进行修改、调试,建议选择这种安装方式,对开发技术水平要求较高,如果代码有更新,可以走 git 流程拉取最新代码。 diff --git a/docs/en-US/welcome/getting-started/installation/git-clone.md b/docs/en-US/welcome/getting-started/installation/git-clone.md index d17ccf793..0fe1f7f9b 100644 --- a/docs/en-US/welcome/getting-started/installation/git-clone.md +++ b/docs/en-US/welcome/getting-started/installation/git-clone.md @@ -27,7 +27,7 @@ yarn install ## 4. Set environment variables -The environment variables required by NocoBase are stored in the root `.env` file, modify the environment variables according to the actual situation, if you don't know how to change them, [click here for environment variables description](../../development/env.md), or you can leave it as default. +The environment variables required by NocoBase are stored in the root `.env` file, modify the environment variables according to the actual situation, if you don't know how to change them, [click here for environment variables description](/api/env), or you can leave it as default. ```bash # Using sqlite database diff --git a/docs/en-US/welcome/getting-started/upgrading/git-clone.md b/docs/en-US/welcome/getting-started/upgrading/git-clone.md index e83081cef..0673c99a3 100644 --- a/docs/en-US/welcome/getting-started/upgrading/git-clone.md +++ b/docs/en-US/welcome/getting-started/upgrading/git-clone.md @@ -14,7 +14,7 @@ git pull ## 3. Update dependencies -``` +```bash yarn install ``` diff --git a/docs/zh-CN/welcome/getting-started/installation/git-clone.md b/docs/zh-CN/welcome/getting-started/installation/git-clone.md index 056a1d2db..dae8e5829 100644 --- a/docs/zh-CN/welcome/getting-started/installation/git-clone.md +++ b/docs/zh-CN/welcome/getting-started/installation/git-clone.md @@ -29,7 +29,7 @@ yarn install ## 4. 设置环境变量 -NocoBase 所需的环境变量储存在根目录 `.env` 文件里,根据实际情况修改环境变量,如果你不知道怎么改,[点此查看环境变量说明](../../development/env.md),也可以保持默认。 +NocoBase 所需的环境变量储存在根目录 `.env` 文件里,根据实际情况修改环境变量,如果你不知道怎么改,[点此查看环境变量说明](/api/env),也可以保持默认。 ```bash # 使用 sqlite 数据库 diff --git a/packages/core/server/src/plugin-manager/PluginManager.ts b/packages/core/server/src/plugin-manager/PluginManager.ts index 2fe2fbe3e..841ce2300 100644 --- a/packages/core/server/src/plugin-manager/PluginManager.ts +++ b/packages/core/server/src/plugin-manager/PluginManager.ts @@ -42,14 +42,7 @@ export class PluginManager { this.repository = this.collection.repository as PluginManagerRepository; this.repository.setPluginManager(this); this.app.resourcer.define(resourceOptions); - this.app.acl.use(async (ctx, next) => { - if (ctx.action.resourceName === 'pm') { - ctx.permission = { - skip: true, - }; - } - await next(); - }); + this.app.acl.allow('pm', ['enable', 'disable', 'remove'], 'allowConfigure'); this.server = net.createServer((socket) => { socket.on('data', async (data) => { const { method, plugins } = JSON.parse(data.toString());