Skip to content

Fix permissions for SelectionList - #12763

Merged
SchrodingersGat merged 2 commits into
inventree:masterfrom
SchrodingersGat:template-api-fix
Sep 2, 2026
Merged

SchrodingersGat merged 2 commits into
inventree:masterfrom
SchrodingersGat:template-api-fix

Conversation

@SchrodingersGat

Copy link
Copy Markdown
Member

SelectionList access should be gated on staff role permissions.

@SchrodingersGat SchrodingersGat added this to the 1.6.0 milestone Sep 2, 2026
@SchrodingersGat SchrodingersGat added bug Identifies a bug which needs to be addressed api Relates to the API security Relates to a security issue backport Apply this label to a PR to enable auto-backport action backport-to-1.5.x labels Sep 2, 2026
@netlify

netlify Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for inventree-web-pui-preview canceled.

Name Link
🔨 Latest commit 7b7f8fb
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/6a978b520d99f80008ea78c2

@codecov

codecov Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.07%. Comparing base (b03d3b1) to head (7b7f8fb).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #12763   +/-   ##
=======================================
  Coverage   87.06%   87.07%           
=======================================
  Files        1483     1483           
  Lines      100120   100180   +60     
  Branches    11606    11606           
=======================================
+ Hits        87171    87233   +62     
+ Misses      12884    12882    -2     
  Partials       65       65           
Flag Coverage Δ
backend 91.09% <100.00%> (+0.01%) ⬆️

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

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

self.assertTrue(SelectionListEntry.objects.filter(pk=self.entry.pk).exists())


class SelectionListStaffPermissionAPITests(InvenTreeAPITestCase):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a whole test class to test a widely used permission class?

@matmair

matmair commented Sep 2, 2026

Copy link
Copy Markdown
Member

I would consider this breaking as it changes current api behavior. A backport would be uncommon

@SchrodingersGat
SchrodingersGat merged commit f9f9f74 into inventree:master Sep 2, 2026
69 of 72 checks passed
@SchrodingersGat
SchrodingersGat deleted the template-api-fix branch September 2, 2026 05:16
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
❌ 1.5.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

backport --pr 12763

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

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

Labels

api Relates to the API backport Apply this label to a PR to enable auto-backport action backport-to-1.5.x bug Identifies a bug which needs to be addressed security Relates to a security issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants