Skip to content

Restrict queryset for DataImportSession#11602

Merged
SchrodingersGat merged 4 commits intoinventree:masterfrom
SchrodingersGat:data-import-api
Mar 24, 2026
Merged

Restrict queryset for DataImportSession#11602
SchrodingersGat merged 4 commits intoinventree:masterfrom
SchrodingersGat:data-import-api

Conversation

@SchrodingersGat
Copy link
Member

@SchrodingersGat SchrodingersGat commented Mar 24, 2026

Tasks

  • Add API unit tests

- Only allow non-staff users to see their own sessions
@SchrodingersGat SchrodingersGat added this to the 1.3.0 milestone Mar 24, 2026
@SchrodingersGat SchrodingersGat added 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.2.x labels Mar 24, 2026
@netlify
Copy link

netlify bot commented Mar 24, 2026

Deploy Preview for inventree-web-pui-preview ready!

Name Link
🔨 Latest commit e527571
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/69c2758e04d60e0008f97d6f
😎 Deploy Preview https://deploy-preview-11602--inventree-web-pui-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 94 (🟢 up 2 from production)
Accessibility: 81 (no change from production)
Best Practices: 100 (no change from production)
SEO: 78 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov
Copy link

codecov bot commented Mar 24, 2026

Codecov Report

❌ Patch coverage is 88.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.44%. Comparing base (4865a2b) to head (e527571).
⚠️ Report is 1 commits behind head on master.

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #11602   +/-   ##
=======================================
  Coverage   91.44%   91.44%           
=======================================
  Files         962      962           
  Lines       49715    49739   +24     
=======================================
+ Hits        45460    45482   +22     
- Misses       4255     4257    +2     
Flag Coverage Δ
backend 89.24% <88.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
Backend Apps 91.70% <91.66%> (-0.01%) ⬇️
Backend General 93.43% <0.00%> (ø)
Frontend ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@matmair matmair left a comment

Choose a reason for hiding this comment

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

LGTM

@SchrodingersGat SchrodingersGat merged commit b98fc9c into inventree:master Mar 24, 2026
36 of 37 checks passed
@SchrodingersGat SchrodingersGat deleted the data-import-api branch March 24, 2026 12:29
github-actions bot pushed a commit that referenced this pull request Mar 24, 2026
* Restrict queryset for DataImportSession

- Only allow non-staff users to see their own sessions

* Add unit test

* raise PermissionDenied if no user info available

(cherry picked from commit b98fc9c)
@github-actions
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
1.2.x

Questions ?

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

SchrodingersGat added a commit that referenced this pull request Mar 24, 2026
* Restrict queryset for DataImportSession

- Only allow non-staff users to see their own sessions

* Add unit test

* raise PermissionDenied if no user info available

(cherry picked from commit b98fc9c)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
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.2.x security Relates to a security issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants