halo-sigs / plugin-links

Halo 2.0 的链接管理插件
https://www.halo.run/store/apps/app-hfbQg
GNU General Public License v3.0
30 stars 7 forks source link

新增super-role角色无链接管理权限 #9

Closed zzudongxiang closed 1 year ago

zzudongxiang commented 1 year ago

问题版本:

复现步骤:

  1. 新增用户,并给用户赋予super-role权限
  2. 安装plugin-links插件,并启用插件
  3. 新增用户无链接的编辑、查看等权限
  4. 切换admin账户后有相关的编辑权限
JohnNiang commented 1 year ago

/kind bug /cc @halo-sigs/halo

guqing commented 1 year ago
image

checkout 到 release-2.2 tag 并按照上述复现步骤没有复现,你们试一下 @halo-sigs/halo

guqing commented 1 year ago

Hi @zzudongxiang,你说的赋予新建的用户 super-role 权限是直接给已有的 super-role 角色还是创建一个新角色勾选全部

guqing commented 1 year ago

Hi @zzudongxiang,你说的赋予新建的用户 super-role 权限是直接给已有的 super-role 角色还是创建一个新角色勾选全部

我尝试了此种情况发现确实有问题,原因是 links group 的 role template 配置有问题导致给予了权限确 403

http://localhost:8090/apis/core.halo.run/v1alpha1/linkgroups

需要修改 roleTemplate.yaml 加上 linkgroups 的权限,目前看到只有 links 相关的

image
guqing commented 1 year ago

/good-first-issue /triage accepted

f2c-ci-robot[bot] commented 1 year ago

@guqing: This request has been marked as suitable for new contributors.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-good-first-issue command.

In response to [this](https://github.com/halo-sigs/plugin-links/issues/9): >/good-first-issue >/triage accepted Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
guqing commented 1 year ago

/assign

guqing commented 1 year ago

已在 #15 修复,我先关闭此 issue

guqing commented 1 year ago

/close

f2c-ci-robot[bot] commented 1 year ago

@guqing: Closing this issue.

In response to [this](https://github.com/halo-sigs/plugin-links/issues/9#issuecomment-1451191241): >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.