Skip to content

[1.7.x] [bug] Require only 'view' permission to read model metadata (#13348) - #13350

Merged
SchrodingersGat merged 1 commit into
1.7.xfrom
backport/1.7.x/pr-13348
Nov 24, 2026
Merged

SchrodingersGat merged 1 commit into
1.7.xfrom
backport/1.7.x/pr-13348

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from master to 1.7.x:

Questions ?

Please refer to the Backport tool documentation

ContentTypePermission works out 'view' for safe methods and 'change'
otherwise, but its fallback for models without check_permission()
(e.g. Part, StockItem) still passed a hardcoded 'change'. Reading
metadata via the generic metadata endpoint therefore required 'change'
permission, unlike the model's own detail endpoint, which needs 'view'.

Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 3744e74)
@SchrodingersGat SchrodingersGat added bug Identifies a bug which needs to be addressed api Relates to the API labels Nov 23, 2026
@SchrodingersGat SchrodingersGat modified the milestones: 1.8.0, 1.7.4 Nov 23, 2026
@codecov

codecov Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.04%. Comparing base (e7b6bc3) to head (4d973be).

Additional details and impacted files
@@           Coverage Diff           @@
##            1.7.x   #13350   +/-   ##
=======================================
  Coverage   87.04%   87.04%           
=======================================
  Files        1566     1566           
  Lines      111829   111839   +10     
  Branches    12070    12070           
=======================================
+ Hits        97341    97354   +13     
+ Misses      14422    14419    -3     
  Partials       66       66           
Flag Coverage Δ
backend 91.38% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
Backend Apps 92.88% <100.00%> (+<0.01%) ⬆️
Backend General 94.95% <100.00%> (+<0.01%) ⬆️
Frontend 79.67% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SchrodingersGat
SchrodingersGat merged commit 4683838 into 1.7.x Nov 24, 2026
41 of 42 checks passed
@SchrodingersGat
SchrodingersGat deleted the backport/1.7.x/pr-13348 branch November 24, 2026 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Relates to the API bug Identifies a bug which needs to be addressed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants