Skip to content

fix: CanOperationInstance need project admin#3074

Merged
iwanghc merged 1 commit into
mainfrom
fix_instance_tips
Jul 1, 2025
Merged

fix: CanOperationInstance need project admin#3074
iwanghc merged 1 commit into
mainfrom
fix_instance_tips

Conversation

@Jarvis1105
Copy link
Copy Markdown
Contributor

@Jarvis1105 Jarvis1105 commented Jul 1, 2025

User description

关联的 issue

https://github.com/actiontech/sqle-ee/issues/2387#issuecomment-3021913873

描述你的变更

  • 有项目管理员权限可以通过tips接口查看所有的数据源而不是作用范围是project的权限

确认项(pr提交后操作)

Tip

请在指定复审人之前,确认并完成以下事项,完成后✅


  • 我已完成自测
  • 我已记录完整日志方便进行诊断
  • 我已在关联的issue里补充了实现方案
  • 我已在关联的issue里补充了测试影响面
  • 我已确认了变更的兼容性,如果不兼容则在issue里标记 not_compatible
  • 我已确认了是否要更新文档,如果要更新则在issue里标记 need_update_doc


Description

  • 修复索引建议规则中权限判断错误

  • 添加判断项目管理员权限条件

  • 移除错误的项目范围权限判断


Changes diagram

flowchart LR
  A["权限校验逻辑检查"] --> B["全局管理权限"]
  A --> C["检查项目管理员权限"]
  C --> D["允许访问所有数据源"]
Loading

Changes walkthrough 📝

Relevant files
Bug fix
project_permission.go
修改权限检查,增加项目管理员支持                                                                                 

sqle/api/controller/v1/project_permission.go

  • 替换对象权限判断为项目管理员权限判断
  • 更新权限校验逻辑确保项目管理员正常访问
+2/-2     

Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @Jarvis1105 Jarvis1105 requested a review from LordofAvernus July 1, 2025 05:59
    @actiontech-bot actiontech-bot requested review from iwanghc and removed request for LordofAvernus July 1, 2025 05:59
    @github-actions
    Copy link
    Copy Markdown

    github-actions Bot commented Jul 1, 2025

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @Jarvis1105 Jarvis1105 requested a review from LordofAvernus July 1, 2025 06:02
    @actiontech-bot actiontech-bot requested review from iwanghc and removed request for LordofAvernus and iwanghc July 1, 2025 06:02
    @Jarvis1105 Jarvis1105 requested review from LordofAvernus and removed request for iwanghc July 1, 2025 06:02
    @actiontech-bot actiontech-bot requested review from iwanghc and removed request for LordofAvernus July 1, 2025 06:02
    @iwanghc iwanghc merged commit 27d4464 into main Jul 1, 2025
    4 checks passed
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels

    None yet

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    2 participants