Skip to content

fix: error of init op permission #460

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

Merged
merged 1 commit into from
May 28, 2025
Merged

Conversation

littleniannian
Copy link
Collaborator

@littleniannian littleniannian commented May 27, 2025

User description

issue: https://github.com/actiontech/sqle-ee/issues/2374


Description

  • 修改操作权限名称和描述

  • 更新系统管理员和项目总监定义

  • 添加普通用户权限配置


Changes walkthrough 📝

Relevant files
Enhancement
op_permission.go
调整权限名称及描述,扩展权限种类                                                                                 

internal/dms/biz/op_permission.go

  • 修改了“全局浏览”为“审计管理员”的名称和描述
  • 修改了“全局管理”为“系统管理员”的名称和描述
  • 更新“创建项目”为“项目总监”的名称和描述
  • 新增普通用户权限配置
  • +12/-6   

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • Copy link

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    数据库唯一键

    请确认新增权限条目(如“项目总监”和“普通用户”)在数据库唯一约束下不会引发冲突,同时复核注释中提到名称、描述弃用的潜在影响。

    	Name:      "项目总监", // todo i18n 返回时会根据uid国际化,name、desc已弃用;数据库name字段是唯一键,故暂时保留
    	RangeType: OpRangeTypeGlobal,
    	Desc:      "创建项目、配置项目资源",
    },
    {
    	UID:       pkgConst.UIDOfOrdinaryUser,
    	Name:      "普通用户", // todo i18n 返回时会根据uid国际化,name、desc已弃用;数据库name字段是唯一键,故暂时保留
    	RangeType: OpRangeTypeGlobal,
    	Desc:      "基础功能操作权限,可进行日常业务操作",
    国际化提醒

    请注意todo i18n注释,确保所有有关权限的国际化工作在后续更新中得到充分覆盖,避免遗漏或不一致的问题。

    	Name:      "项目总监", // todo i18n 返回时会根据uid国际化,name、desc已弃用;数据库name字段是唯一键,故暂时保留
    	RangeType: OpRangeTypeGlobal,
    	Desc:      "创建项目、配置项目资源",
    },
    {
    	UID:       pkgConst.UIDOfOrdinaryUser,
    	Name:      "普通用户", // todo i18n 返回时会根据uid国际化,name、desc已弃用;数据库name字段是唯一键,故暂时保留
    	RangeType: OpRangeTypeGlobal,
    	Desc:      "基础功能操作权限,可进行日常业务操作",

    Copy link

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @LordofAvernus LordofAvernus merged commit 13ad5f4 into main May 28, 2025
    1 check passed
    @littleniannian littleniannian deleted the fix_op_permission_init branch May 28, 2025 05:52
    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