halo icon indicating copy to clipboard operation
halo copied to clipboard

feat: add some APIs to separate plugin-related Setting and ConfigMap permissions

Open guqing opened this issue 3 years ago • 1 comments

What type of PR is this?

/kind improvement /area core /kind api-change /milestone 2.2.x

What this PR does / why we need it:

添加自定义 APIs 以分离插件对 Setting 和 ConfigMap 权限的依赖

⚠️ 此 PR 新增了 APIs,需要 Console 对其进行适配,插件查询 Setting、ConfigMap 的 APIs 需要更改。

Which issue(s) this PR fixes:

A part of https://github.com/halo-dev/halo/issues/3069

Special notes for your reviewer:

how to test it?

  • 测试 GET /plugins/{name}/setting 是否能正确获取到插件名称对应的主题的 Setting。
  • 测试 GET /plugins/{name}/config 是否能正确获取到插件名称对应的主题的 ConfigMap。
  • 测试 PUT /plugins/{name}/config 是否能更新插件的 ConfigMap,如果名称不匹配则抛出异常。 切换用户为其分配主题的查看权限可以有权限调用以上描述的 GET 请求的 endpoints,管理权限可以调用 PUT /plugins/{name}/config。 /cc @halo-dev/sig-halo

Does this PR introduce a user-facing change?

添加自定义 APIs 以分离插件对 Setting 和 ConfigMap 权限的依赖

guqing avatar Jan 12 '23 09:01 guqing

https://github.com/halo-dev/halo/pull/3161 已经合并,这个 PR 可以测试了。

ruibaby avatar Jan 19 '23 08:01 ruibaby

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang, ruibaby

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • ~~OWNERS~~ [JohnNiang,ruibaby]

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

f2c-ci-robot[bot] avatar Jan 30 '23 06:01 f2c-ci-robot[bot]