Skip to content

feat: Add rule for role (#23823)#23851

Merged
mergify[bot] merged 14 commits intomatrixorigin:3.0-devfrom
ouyuanning:cp-23823-to-3.0-dev
Apr 1, 2026
Merged

feat: Add rule for role (#23823)#23851
mergify[bot] merged 14 commits intomatrixorigin:3.0-devfrom
ouyuanning:cp-23823-to-3.0-dev

Conversation

@ouyuanning
Copy link
Copy Markdown
Contributor

@ouyuanning ouyuanning commented Mar 16, 2026

增加面向角色的改写规则
新增语法
ALTER ROLE role_name ADD RULE "SELECT * FROM hint_test.users WHERE age > 28" ON TABLE hint_test.users (ON TABLE 后面是真实的库表名)
ALTER ROLE role_name REMOVE RULE ON TABLE hint_test.users

新增元数据表
create table mo_catalog.mo_role_rule(role_id int unsign, rule_name varchar(200 rule varchar(500), primary key(role_id, rule_name));

Approved by: @iamlinjunhong, @heni02, @XuPeng-SH, @LeftHandCold, @fengttt

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue #23271

What this PR does / why we need it:

增加面向角色的改写规则,以满足MOI行列权限的需求

增加面向角色的改写规则
新增语法
ALTER ROLE  role_name ADD RULE "SELECT * FROM hint_test.users WHERE age > 28" ON TABLE hint_test.users
(ON TABLE 后面是真实的库表名)
ALTER ROLE role_name REMOVE RULE ON TABLE hint_test.users

新增元数据表
create table mo_catalog.mo_role_rule(role_id int unsign,  rule_name varchar(200  rule varchar(500), primary key(role_id, rule_name));

Approved by: @iamlinjunhong, @heni02, @XuPeng-SH, @LeftHandCold, @fengttt
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Apr 1, 2026

Merge Queue Status

  • Entered queue2026-04-01 08:35 UTC · Rule: release-3.0
  • Checks passed · in-place
  • Merged2026-04-01 09:25 UTC · at 6e7aa7ceda16356b5f7beaecf27bbe9b700f96b5

This pull request spent 50 minutes 30 seconds in the queue, including 50 minutes 17 seconds running CI.

Required conditions to merge
  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • branch-protection-review-decision = APPROVED [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Utils CI (3.0) / Coverage
    • check-neutral = Matrixone Utils CI (3.0) / Coverage
    • check-skipped = Matrixone Utils CI (3.0) / Coverage
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI (3.0) / SCA Test on Ubuntu/x86
    • check-neutral = Matrixone CI (3.0) / SCA Test on Ubuntu/x86
    • check-skipped = Matrixone CI (3.0) / SCA Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI (3.0) / UT Test on Ubuntu/x86
    • check-neutral = Matrixone CI (3.0) / UT Test on Ubuntu/x86
    • check-skipped = Matrixone CI (3.0) / UT Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Compose CI (3.0) / multi cn e2e bvt test docker compose(Optimistic/PUSH)
    • check-neutral = Matrixone Compose CI (3.0) / multi cn e2e bvt test docker compose(Optimistic/PUSH)
    • check-skipped = Matrixone Compose CI (3.0) / multi cn e2e bvt test docker compose(Optimistic/PUSH)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Compose CI (3.0) / multi cn e2e bvt test docker compose(PESSIMISTIC)
    • check-neutral = Matrixone Compose CI (3.0) / multi cn e2e bvt test docker compose(PESSIMISTIC)
    • check-skipped = Matrixone Compose CI (3.0) / multi cn e2e bvt test docker compose(PESSIMISTIC)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI (3.0) / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
    • check-neutral = Matrixone Standlone CI (3.0) / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
    • check-skipped = Matrixone Standlone CI (3.0) / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI (3.0) / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-neutral = Matrixone Standlone CI (3.0) / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-skipped = Matrixone Standlone CI (3.0) / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI (3.0) / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
    • check-neutral = Matrixone Standlone CI (3.0) / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
    • check-skipped = Matrixone Standlone CI (3.0) / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Upgrade CI (3.0) / Compatibility Test With Target on Linux/x64(LAUNCH)
    • check-neutral = Matrixone Upgrade CI (3.0) / Compatibility Test With Target on Linux/x64(LAUNCH)
    • check-skipped = Matrixone Upgrade CI (3.0) / Compatibility Test With Target on Linux/x64(LAUNCH)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature size/XXL Denotes a PR that changes 2000+ lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants