printedparts: catalog access is printedparts.view-gated
Some checks failed
CI / backend (push) Successful in 1m43s
CI / naming (push) Successful in 2s
CI / frontend (push) Successful in 9s
CI / migrations-mysql (push) Failing after 8s

Browsing the catalog (item list, detail, file listings) now requires
authentication plus the view permission, and the /printedparts pages
and the label print page require login. Still deliberately open: the
kiosk endpoints per the decision record, the image serve and file
download (img tags and anchor downloads cannot carry a JWT), and the
reports (product-wide jwt-optional convention). Grant
printedparts.view to the roles that should see the catalog.
This commit is contained in:
cproudlock
2026-07-17 09:19:30 -04:00
parent 96e48e0f50
commit d1357defc4
5 changed files with 46 additions and 12 deletions

View File

@@ -371,6 +371,20 @@ Two more field requests, and the plugin's FIRST incremental migration:
ACTIVE member of each selected role (role.users backref), deduped with
the user picks and free-text; settings page gains a role picker.
## Stage 16a (extension) - view permission on the catalog
The catalog started with open reads (the product's jwt-optional list
convention). Field decision: browsing and managing the parts catalog is
staff-only, so the reads (list, detail, file listings) move behind
`@jwt_required()` + `require_permission('printedparts.view')`, the
`/printedparts` routes and the label print page gain `requiresAuth`, and
the view permission becomes meaningful in the role grid.
Deliberately still open: the kiosk endpoints (decision record), the image
serve and file download (fetched by `<img>` tags and anchor clicks, which
cannot carry a JWT header), and the reports (product-wide jwt-optional
convention). Grant `printedparts.view` to the roles that should see the
catalog - admins bypass as always.
## Stage 16 (extension) - kiosk touch fixes from first hands-on use
First real touchscreen session found two problems worth their own stage: