Add hold-door web form with proper authorization #41

Open
mykhailo wants to merge 1 commits from mykhailo/inventory-app:issue-7-hold-door into master
First-time contributor

Closes #7

  • compute approved from group membership (was hardcoded True — any logged-in user could hold any door)
  • allow duration=0 to cancel/close (InputRequired, min=0)
  • pass HoldDoorForm to template so CSRF token renders
  • add hold form section to doorboy.html
  • index doorlog (door, approved, timestamp) for the proxy query

Files: doorboy.py, main.py, templates/doorboy.html.

Closes #7 - compute `approved` from group membership (was hardcoded True — any logged-in user could hold any door) - allow `duration=0` to cancel/close (InputRequired, min=0) - pass HoldDoorForm to template so CSRF token renders - add hold form section to doorboy.html - index doorlog (door, approved, timestamp) for the proxy query Files: doorboy.py, main.py, templates/doorboy.html.
mykhailo added 1 commit 2026-06-17 13:54:17 +00:00
- compute approved from group membership (was hardcoded True)
- allow duration=0 to cancel/close (InputRequired, min=0)
- pass HoldDoorForm to template so CSRF token renders
- add hold form section to doorboy.html
- index doorlog (door, approved, timestamp) for the proxy query
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u issue-7-hold-door:mykhailo-issue-7-hold-door
git checkout mykhailo-issue-7-hold-door
Sign in to join this conversation.