Skip to content

Restrict the self-host Admin area to admins - #1987

Merged
RhysSullivan merged 1 commit into
UsefulSoftwareCo:mainfrom
baggiiiie:fix/selfhost-admin-area-access
Sep 15, 2026
Merged

RhysSullivan merged 1 commit into
UsefulSoftwareCo:mainfrom
baggiiiie:fix/selfhost-admin-area-access

Conversation

@baggiiiie

Copy link
Copy Markdown
Contributor

Summary

plain self-hosted members could see Admin in the sidebar, and opening it rendered the workspace member directory before the invite API refused them.

this change makes the self-host Admin entry role-aware and replaces direct /admin access with an explicit denial before member details or admin controls render.

before

plain member can open Admin and see member emails

after

Admin is hidden and direct access is refused

Linked issue

Fixes #1900

Verification

  • changed-file format check
  • bun run lint
  • self-host and e2e typecheck
  • self-host tests — 153 passed
  • e2e — Admin · the self-hosted admin area is visible and accessible only to adminsrecording
  • existing e2e — Admin · a self-hosted owner sees the workspace's users; an invited member is refused

Checklist

  • Added a changeset (bun run changeset), or this change needs none.
  • Added or updated tests for the new behaviour.
  • No secrets, credentials, or private data in the diff.

@baggiiiie
baggiiiie force-pushed the fix/selfhost-admin-area-access branch from c165e94 to 643ebc8 Compare September 15, 2026 02:20
@RhysSullivan
RhysSullivan merged commit 347537c into UsefulSoftwareCo:main Sep 15, 2026
40 checks passed
@baggiiiie
baggiiiie deleted the fix/selfhost-admin-area-access branch September 15, 2026 05:48
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.

[bug] Admin Area Visible to Non Admin users

2 participants