-
Notifications
You must be signed in to change notification settings - Fork 106
fix(权限管理): 修复集群权限校验逻辑并更新相关UI文案 #188
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
Conversation
修复集群权限校验逻辑,确保管理员权限也能正确校验命名空间权限 更新用户和管理员界面的授权相关文案,使其更清晰准确 在集群管理页面添加命名空间选择功能
📝 WalkthroughSummary by CodeRabbit
Walkthrough本次变更对集群权限管理进行了细化:后端在“exec”操作时对集群管理员增加了命名空间级别的校验,前端则在多个页面引入了命名空间限制的可视化配置,并优化了授权相关的提示文案,提升了权限管理的透明度和可操作性。 Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant API
participant PermissionChecker
User->>API: 请求执行 exec 操作(含命名空间)
API->>PermissionChecker: 校验用户权限(角色、命名空间)
alt 用户为 cluster admin
PermissionChecker->>PermissionChecker: 校验命名空间权限
alt 通过
PermissionChecker-->>API: 允许操作
else 未通过
PermissionChecker-->>API: 拒绝操作
end
else 用户为 cluster readonly + exec
PermissionChecker->>PermissionChecker: 校验命名空间权限
alt 通过
PermissionChecker-->>API: 允许操作
else 未通过
PermissionChecker-->>API: 拒绝操作
end
else
PermissionChecker-->>API: 拒绝操作
end
API-->>User: 返回操作结果
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🧰 Additional context used🧬 Code Graph Analysis (1)pkg/cb/cb.go (3)
🔇 Additional comments (11)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
修复集群权限校验逻辑,确保管理员权限也能正确校验命名空间权限
更新用户和管理员界面的授权相关文案,使其更清晰准确
在集群管理页面添加命名空间选择功能