Repository navigation
Let administrators change a facility's manager and logbooks - #77
Merged
Merged
Conversation
The Facilities inventory page was read-only, so changing a facility's manager, who gets its change and expiration emails, or its logbooks, where its authorization changes are logged, needed a database console. Administrators now get an Edit button there: select a facility, change the manager's username or the comma-separated logbooks, and save. It posts to the new /ajax/edit-facility endpoint, which calls FacilityFacade.editFacility, restricted to jam-admin. The manager is trimmed, required, and at most 32 characters; the logbooks are trimmed around each comma, with empty names dropped, and at most 64 characters, the columns' sizes. Empty logbooks are stored as null, which, as before, makes no log entries for the facility. Name, path and order are still changed in the database. The user guide now describes the page. Fixes #71 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
slominskir-coding-agent
Bot
force-pushed
the
facility-manager-editable
branch
from
November 16, 2026 13:41
effcb9c to
2848718
Compare
slominskir
approved these changes
Nov 16, 2026
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.
Summary
Administrators can now change a facility's manager and logbooks from Inventory › Facilities, instead of a developer doing it in a database console.
jam-adminusers (no Add or Remove). Selecting a facility and Edit opens a dialog with the facility's name, its manager's username and its logbooks./ajax/edit-facilityendpoint, which callsFacilityFacade.editFacility, restricted tojam-admin.MANAGER_USERNAMEcolumn's size)." TLOG , ELOG ,, "is stored asTLOG,ELOG), at most 64 characters (LOGBOOKS_CSV). Empty is stored as null, which, as before, makes no log entries for the facility.Fixes #71
No deployment steps: no schema change.
Checks
./gradlew spotlessCheck build: passes.zensical build --strictfor the user guide: no issues.build.yamlon its own Compose project and ports, with the stock Oracle, Keycloak, Puppet and MailHog services):jsmith(jam-user) get "Not authorized" and nothing changes;jdoe(jam-admin) saves, and the page then shows the new manager andTLOG,ELOG. Blank logbooks clear the column; a blank manager, a 33-character manager, 65 characters of logbooks and an unknown facility ID each return their error. Other facilities are unchanged.jdoe: only Edit and Unselect show; Edit is disabled until a row is selected; the dialog is titled "Edit Facility" and prefilled with the row's name, manager and logbooks; a server error shows as an alert with the dialog left open; saving reloads the page with the new values; reopening on another row shows that row's values. No JavaScript errors. Anonymous andjsmithsee no Edit button.Decisions
@NotNull, although the column allows null. Logbooks may be empty, as the column andLogbookFacadealready allow.🤖 Generated with Claude Code
Prepared-by: Anthropic Claude Code:claude-opus-5-5