Admin
Admin
Admin — Technical Spec
app/im2.py (admin_hub), template app/templates/admin.html. Linked from the Main Menu (app/menu.html, Support section) and appears in base.html's screen_names map as admin.
Routes
| Method | Path | Auth | Notes |
|---|---|---|---|
| GET | /admin | any signed-in user | Renders up to 3 tiles; visibility per tile below. |
No POST routes — Admin only links out to the three existing screens' own routes (/tables, /settings, /users), which keep their existing auth checks unchanged.
Tile visibility
Built server-side in admin_hub(), not filtered by CSS/JS, so a role without access never even sees the tile:
- Tables —
can(user, "tables_edit")(same action key as the/tablesnav link). - System Settings —
can(user, "settings_edit")(same action key as/settings). - Users —
user["role"] == "admin"(Users has norole_action_permsentry; it is hard-coded admin-only same as the/usersroute itself and the top-nav link).
If none are visible, the template shows a plain-text message instead of an empty grid.
Gotchas
- This is a pure hub page — it duplicates the visibility rule from
/tables,/settings,/usersbut not their enforcement. If a role'stables_edit/settings_editgrant changes via Permissions, the tile reflects it within the 60s_ACTION_CACHETTL, same lag as the top-nav links. - Add new admin-style screens to the
tileslist inadmin_hub(), not to the Main Menu directly, unless a screen is meant to stay a top-level Main Menu tile.