Skip to content

Show email in admin comments, auto-fill name for admin, and add missing admin auth checks#510

Merged
compscidr merged 2 commits intomainfrom
fix/admin-comment-improvements
Mar 16, 2026
Merged

Show email in admin comments, auto-fill name for admin, and add missing admin auth checks#510
compscidr merged 2 commits intomainfrom
fix/admin-comment-improvements

Conversation

@compscidr
Copy link
Collaborator

@compscidr compscidr commented Mar 16, 2026

Summary

Closes #508
Closes #509

Test plan

  • All existing tests pass
  • Admin dashboard: recent comments table now shows email addresses
  • View a post while logged in as admin: name field is pre-filled with site title
  • View a post while not logged in: name field is empty as before
  • Access /admin, /admin/dashboard, /admin/posts, /admin/newpost, /admin/settings while not admin: should get 401

🤖 Generated with Claude Code

- Add Email column to the recent comments table on the admin dashboard
- Pre-fill the comment name field with site_title when admin is logged
  in so the admin doesn't have to type their name each time

Closes #508
Closes #509

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 16, 2026 22:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the blog’s HTML templates to improve comment moderation and reduce friction for admins when leaving comments.

Changes:

  • Adds an Email column to the “Recent Comments” table on the admin dashboard.
  • Pre-fills the comment “Name” field with the site_title value when an admin is viewing a post.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
templates/post.html Auto-fills the comment name input for admins using the configured site title.
templates/admin_dashboard.html Displays commenter email addresses in the recent comments table.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

AdminDashboard, AdminPosts, AdminNewPost, AdminSettings, and the
Admin root handler were all missing IsAdmin checks, allowing
non-admin users to access these pages. Add the same guard used by
AdminPages, AdminEditPage, AdminPostTypes, and AdminEditPostType.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@compscidr compscidr changed the title Show email in admin comments and auto-fill name for admin Show email in admin comments, auto-fill name for admin, and add missing admin auth checks Mar 16, 2026
@compscidr compscidr merged commit 84ee375 into main Mar 16, 2026
1 check passed
@compscidr compscidr deleted the fix/admin-comment-improvements branch March 16, 2026 22:52
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.

if admin logged in, they shouldn't have to leave a name or email for comment recent comments in admin interface should show email address

2 participants