Skip to content

Fix blank Permissions pages - #190

Merged
olsonjp merged 1 commit into
mainfrom
permission-list-stale-objects
Nov 10, 2026
Merged

olsonjp merged 1 commit into
mainfrom
permission-list-stale-objects

Conversation

@olsonjp

@olsonjp olsonjp commented Nov 10, 2026

Copy link
Copy Markdown
Owner

What

The Permissions page rendered empty. `permission_list.html`, `permission_form.html` and `bulk_permission_form.html` extended `base/base.html`, which has no `content` block, so everything inside them was discarded (the response was a 200 with an empty body). Every other page extends `base/layout.html`.

  • The three templates now extend the real layout and use the app's own styles (same look as the Users page).
  • Added the missing `permission_confirm_delete.html`: `revoke_permission` rendered it and it did not exist, so revoking would have been a 500. Added a Revoke button to each row.
  • Each permission's item is described by a helper that cannot raise: "Sample: MM134", "Sample Cap content width to ~1500px #123 (no longer exists)", or "... (this kind of item no longer exists)" for a removed model. A permission pointing at a deleted tube or the old tube model can no longer break the list.

Tests

7 new tests: the list renders real content inside the layout, an existing object, a deleted object, a removed model, the empty list, the grant, bulk-grant and revoke pages, revoking, and granting through the form. Full suite passes (543).

Audit

I checked every template the project references. The only other missing ones are `krill/reports.html` (a view that is not routed) and `admin/data_import.html` (which lives in the root `templates/` folder and exists). `auth/login.html` also extends `base.html`, but it is a standalone page that is meant to.

🤖 Generated with Claude Code

The permission list, grant and bulk-grant templates extended base/base.html,
which has no content block, so everything in them was discarded and the page
was empty. Move them onto layout.html in the app's own style, add the missing
revoke confirmation page and a Revoke action, and describe each permission's
target safely so a deleted item or removed model cannot break the list.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@olsonjp
olsonjp merged commit 38a76ae into main Nov 10, 2026
1 check passed
@olsonjp
olsonjp deleted the permission-list-stale-objects branch November 10, 2026 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant