Important: When you begin this ticket, create a new branch from feat/admin-auth and not main. When you open a PR, open it into feat/admin-auth and not main.
Description
The blog and email server actions in the admin panel currently rely solely on proxy for auth protection. Server actions can technically be invoked via direct POST requests, so each one should also verify the session itself as defense-in-depth.
Acceptance Criteria
Important: When you begin this ticket, create a new branch from feat/admin-auth and not main. When you open a PR, open it into feat/admin-auth and not main.
Description
The blog and email server actions in the admin panel currently rely solely on proxy for auth protection. Server actions can technically be invoked via direct POST requests, so each one should also verify the session itself as defense-in-depth.
Acceptance Criteria
createBlogPostserver action callsrequireAdmin()before any other logicsendEmailserver action callsrequireAdmin()before any other logic/admin/loginwhen called without a valid session