Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Console 首次加载页面请求插件需要阻止无权限提示 #3156

Closed
ruibaby opened this issue Jan 15, 2023 · 0 comments · Fixed by halo-dev/console#823
Closed

Console 首次加载页面请求插件需要阻止无权限提示 #3156

ruibaby opened this issue Jan 15, 2023 · 0 comments · Fixed by halo-dev/console#823
Labels
area/console Issues or PRs related to the Halo Console kind/improvement Categorizes issue or PR as related to a improvement.
Milestone

Comments

@ruibaby
Copy link
Member

ruibaby commented Jan 15, 2023

是什么版本出现了此问题?

2.1.0

使用的什么数据库?

H2

使用的哪种方式部署?

Docker Compose

在线站点地址

https://demo.halo.run

发生了什么?

目前 Console 端的插件机制需要先查询插件接口然后根据插件入口 JS 地址加载 Console 端的插件,但目前如果用户的角色没有插件查看的权限,会提示 无权限访问,期望可以隐藏这个提示。

image

/kind improvement
/area console
/milestone 2.2.x

相关日志输出

No response

附加信息

No response

@f2c-ci-robot f2c-ci-robot bot added the kind/improvement Categorizes issue or PR as related to a improvement. label Jan 15, 2023
@f2c-ci-robot f2c-ci-robot bot added this to the 2.2.x milestone Jan 15, 2023
@f2c-ci-robot f2c-ci-robot bot added the area/console Issues or PRs related to the Halo Console label Jan 15, 2023
f2c-ci-robot bot pushed a commit to halo-dev/console that referenced this issue Jan 16, 2023
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

优化 Console 端加载插件资源的逻辑。

1. 查询接口改为自定义接口,传入 enabled 参数进行筛选。
2. 修改符合 Console 插件的筛选判断。
3. 隐藏加载异常的提示。

#### Which issue(s) this PR fixes:

Fixes halo-dev/halo#3156

#### Special notes for your reviewer:

测试方式:

1. 安装若干带有 Console 端拓展的插件,比如:https://github.com/halo-sigs/plugin-stackedit
2. 检查是否有加载成功。
3. 创建一个没有插件访问权限的角色。
4. 登录之后检查是否有无权限提示。

#### Does this PR introduce a user-facing change?


```release-note
优化 Console 端加载插件资源的逻辑。
```
@JohnNiang JohnNiang modified the milestones: 2.2.x, 2.2.0 Jan 17, 2023
JohnNiang pushed a commit to JohnNiang/halo that referenced this issue Mar 2, 2023
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

优化 Console 端加载插件资源的逻辑。

1. 查询接口改为自定义接口,传入 enabled 参数进行筛选。
2. 修改符合 Console 插件的筛选判断。
3. 隐藏加载异常的提示。

#### Which issue(s) this PR fixes:

Fixes halo-dev#3156

#### Special notes for your reviewer:

测试方式:

1. 安装若干带有 Console 端拓展的插件,比如:https://github.com/halo-sigs/plugin-stackedit
2. 检查是否有加载成功。
3. 创建一个没有插件访问权限的角色。
4. 登录之后检查是否有无权限提示。

#### Does this PR introduce a user-facing change?


```release-note
优化 Console 端加载插件资源的逻辑。
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/console Issues or PRs related to the Halo Console kind/improvement Categorizes issue or PR as related to a improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants