pub fn require_admin(
session: Option<AdminSession>,
) -> Result<AdminSession, AdminReject>Expand description
Requires a signed-in admin for a human screen, else a redirect to the sign-in page. The
first line of every admin-gated page handler (which returns Result<Template, AdminReject>): a
handler’s existing Status errors convert through ? (see AdminReject’s From<Status>),
so it keeps its real 404/503 while unauthenticated browsers are bounced to /admin/login.