Repository navigation
Owner decision required: six-digit override PIN, wrong guesses count against the cashier - #675
Merged
Merged
Conversation
…he cashier A new manager override PIN must be 6 to 8 digits; a shorter PIN set earlier keeps working until it is next changed. Wrong PINs are counted against the signed-in person who typed them (five in 15 minutes, ten in a day) instead of the manager they picked, so a cashier can no longer lock a manager's PIN for every register. Owner decision required: docs/decisions/staff-controls-2026-11.md, item d. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…verride-pin-lockout
techmore
marked this pull request as ready for review
November 19, 2026 12:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The decision
Today a manager's override PIN can be four digits. Wrong guesses are counted against the manager whose name was picked, whoever typed them: five in 15 minutes lock that manager's PIN at every register. So any cashier can stop a manager approving anything, and a cashier guessing five at a time can get through every four-digit PIN in about three weeks.
What this changes
Not changed: who can approve, the reason rule, what can be overridden, the audit trail (every wrong PIN and lockout is still logged with the cashier's and the manager's names and shows on the exception report).
To know before saying yes
Files
web/app/models/user.rb:pos_override_pin=asks for six digitsweb/app/services/compliance/sale_gate.rb:locked_out?counts by the person who typed, with the day limitweb/app/views/compliance/override_pins/edit.html.erb: the wording and the field patternweb/test/support/compliance_fixtures.rb: the fixture's four-digit PIN is stored as an earlier PIN would beTests
web/test/integration/staff_controls/override_pin_lockout_test.rb, rewritten from the characterization test in #671: a new four-digit PIN is refused and an existing one still verifies; five wrong PINs lock the cashier who typed them while a colleague's override with the same manager goes through; the lock follows the cashier to another manager; ten wrong in a day lock until the day has passed.compliance_sale_gate_test.rbandcompliance_guardrails_test.rbupdated for the six-digit rule.bin/rails test test/integration/staff_controls test/integration/compliance_guardrails_test.rb test/services/compliance_*_test.rb test/services/pos_checkout_compliance_test.rb test/services/pos_event_sale_recorder_test.rb: 54 runs, 0 failuresbin/rubocopon the changed files: no offenses🤖 Generated with Claude Code