Bug Report + UX: Subscriber role has excessive admin access + login page needs overhaul #1132
marcusbellamyshaw-cell
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Subscriber Role Exposes Too Much
Tested with a subscriber-level account and found some significant permission issues in the admin UI.
What a subscriber can currently see/access:
The API correctly rejects destructive actions, so there's no actual data loss risk — but showing a subscriber the full admin UI, delete buttons, and API token settings is confusing at best and a security concern at worst. The principle of least privilege should apply to the UI, not just the API layer.
Expected behavior:
A subscriber should see a minimal dashboard — perhaps just their profile, saved content, or a "you don't have permission to access this" screen. The full sidebar and settings should be gated by role.
Login/Logout UX Needs Significant Work
There's no built-in UI component for surfacing login/logout to visitors. For any site with user accounts this is table-stakes. The workarounds required are non-obvious:
/_emdash/api/auth/logout) — reasonable for CSRF, but means<a>tags don't workCSRF_REJECTEDunlessx-emdash-request: 1header is included/_emdash/admin/login) isn't documented prominently<AuthNav />or equivalent component inemdash/uiThe login page itself is also confusing for non-technical users. Passkeys are great but the UI doesn't explain what they are or provide clear fallback guidance. A first-time subscriber landing on the login page has no idea what to do.
What would help:
<LoginButton />/<LogoutButton />components inemdash/uiisLoggedInto show an admin link have no easy way to check role without additional API calls; aAstro.locals.user.rolefield (if not already there) would helpWe're running [Every Bit Texas](https://everybittexas.com) on EmDash and these came up immediately when we tried to onboard a non-admin user. Happy to provide more details or screenshots.
Beta Was this translation helpful? Give feedback.
All reactions