Skip to content

check every rule belongs to the project and role when reordering project role permissions - #14318

Open
Damans227 wants to merge 1 commit into
apache:4.20from
Damans227:project-role-rule-scope-4.20
Open

Damans227 wants to merge 1 commit into
apache:4.20from
Damans227:project-role-rule-scope-4.20

Conversation

@Damans227

Copy link
Copy Markdown
Collaborator

Reordering a project role's rules looked up each rule id on its own and never checked that it belonged to the project or role the call was made for. This makes reorder and single rule updates use the same lookup, which rejects rule ids from another project, and reorder also rejects rules from another role in the same project.

Test:

Unit tests added for a rule from another project, a rule from another role, and a normal reorder.

@codecov

codecov Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 16.41%. Comparing base (376c1b4) to head (d00a631).

Files with missing lines Patch % Lines
...in/acl/project/UpdateProjectRolePermissionCmd.java 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.20   #14318   +/-   ##
=========================================
  Coverage     16.41%   16.41%           
- Complexity    13657    13664    +7     
=========================================
  Files          5669     5669           
  Lines        501628   501628           
  Branches      60942    60942           
=========================================
+ Hits          82336    82363   +27     
+ Misses       410064   410037   -27     
  Partials       9228     9228           
Flag Coverage Δ
uitests 4.16% <ø> (ø)
unittests 17.28% <85.71%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Damans227
Damans227 force-pushed the project-role-rule-scope-4.20 branch from c2d8498 to d00a631 Compare October 19, 2026 13:19

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant