Skip to content

Comments

Fix access control for non-public templates (enforce ownership for non-admin users)#12683

Open
sudo87 wants to merge 1 commit intoapache:mainfrom
shapeblue:templatePermissionCheck
Open

Fix access control for non-public templates (enforce ownership for non-admin users)#12683
sudo87 wants to merge 1 commit intoapache:mainfrom
shapeblue:templatePermissionCheck

Conversation

@sudo87
Copy link
Collaborator

@sudo87 sudo87 commented Feb 23, 2026

Description

Permission access check looks incorrect for non-public template and non admin user.

Provided non-public templates are not shareable, check must ensure that template is owned by user. For public, ownership flag is passed as false, which makes sense as template can be created by other user.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.92%. Comparing base (30e6c22) to head (afaf21d).

Files with missing lines Patch % Lines
...ain/java/com/cloud/api/query/QueryManagerImpl.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #12683      +/-   ##
============================================
- Coverage     17.92%   17.92%   -0.01%     
- Complexity    16154    16156       +2     
============================================
  Files          5939     5939              
  Lines        533181   533180       -1     
  Branches      65237    65237              
============================================
- Hits          95585    95574      -11     
- Misses       426856   426868      +12     
+ Partials      10740    10738       -2     
Flag Coverage Δ
uitests 3.67% <ø> (ø)
unittests 19.03% <0.00%> (-0.01%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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.

@sudo87 sudo87 marked this pull request as ready for review February 23, 2026 06:44
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.

1 participant