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

当只分配了菜单管理而没有系统配置权限时菜单管理页面会报 403 错误 #6468

Open
guqing opened this issue Aug 14, 2024 · 5 comments
Assignees
Labels
kind/improvement Categorizes issue or PR as related to a improvement.
Milestone

Comments

@guqing
Copy link
Member

guqing commented Aug 14, 2024

如题:错误原因是调用了 /api/v1alpha1/configmaps/system 获取主菜单,但没有权限

Originally posted by @guqing in #6462 (comment)

@ruibaby
Copy link
Member

ruibaby commented Aug 14, 2024

我的建议是专门为主菜单信息的获取和更新提供接口,毕竟菜单管理权限强依赖 ConfigMap 的权限并不合理。

@ruibaby
Copy link
Member

ruibaby commented Aug 14, 2024

/kind improvement
/milestone 2.19.x

@f2c-ci-robot f2c-ci-robot bot added the kind/improvement Categorizes issue or PR as related to a improvement. label Aug 14, 2024
@f2c-ci-robot f2c-ci-robot bot added this to the 2.19.x milestone Aug 14, 2024
@guqing
Copy link
Member Author

guqing commented Aug 14, 2024

我的建议是专门为主菜单信息的获取和更新提供接口,毕竟菜单管理权限强依赖 ConfigMap 的权限并不合理。

我感觉可以单独为设置项出一个自定义 API 可以根据 group 来获取,这样就可以将权限绑定到 Menu 管理权限上,每个地方都为获取配置出两个自定义 APIs 感觉很繁琐

@ruibaby
Copy link
Member

ruibaby commented Aug 14, 2024

我感觉可以单独为设置项出一个自定义 API 可以根据 group 来获取,这样就可以将权限绑定到 Menu 管理权限上,每个地方都为获取配置出两个自定义 APIs 感觉很繁琐

专门给 system 的 ConfigMap 提供接口吗?还是 metadata.name 也可以传入

@guqing
Copy link
Member Author

guqing commented Aug 21, 2024

我感觉可以单独为设置项出一个自定义 API 可以根据 group 来获取,这样就可以将权限绑定到 Menu 管理权限上,每个地方都为获取配置出两个自定义 APIs 感觉很繁琐

专门给 system 的 ConfigMap 提供接口吗?还是 metadata.name 也可以传入

GET/PUT /apis/console.api.halo.run/configmaps/{name}/{groupName}
或者 /apis/console.api.halo.run/systemconfigmaps/{groupName} ,
但我更倾向于方案二,方案一中 subresource 是动态的,动态的子资源路径虽然可以实现,但在 kubernetes 中不太常见,可能不完全符合 Kubernetes API 规范

@ruibaby ruibaby modified the milestones: 2.19.x, 2.20.x Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/improvement Categorizes issue or PR as related to a improvement.
Projects
None yet
Development

No branches or pull requests

2 participants