Skip to content

fix(auth): link access-request notifications to the right deployment - #140

Merged
danielnaab merged 1 commit into
mainfrom
fix/access-request-admin-link
Dec 4, 2026
Merged

danielnaab merged 1 commit into
mainfrom
fix/access-request-admin-link

Conversation

@danielnaab

Copy link
Copy Markdown
Member

Context

The Slack notification for access requests linked to a hardcoded https://forms.labs.flexion.us/admin/users, which 404s. The app is served under a per-branch prefix (/main/...), and / is the deployment dashboard. Access lists are also per-deployment (each branch has its own data/projects.sqlite), so the admin needs to know which deployment the request came from.

Changes

  • Build the link from the request's external origin + resolveUrl('/admin/users'), e.g. https://forms.labs.flexion.us/main/admin/users
  • Name the deployment in the notification title and details (Access requested by @x on main)

Testing

  • New tests in test/auth-routes.test.ts for a branch base path and for root; both failed before the change
  • Full suite under Bun 1.4.5 (CI's version), lint, type check

The Slack notification for access requests hardcoded
https://forms.labs.flexion.us/admin/users, which 404s: the app is
served under a per-branch prefix (/main/...) and access lists are
per-deployment. Build the link from the request origin plus the base
path, and name the deployment in the title and details.

Pot-Run: 9e13
@danielnaab
danielnaab merged commit 4e10479 into main Dec 4, 2026
4 checks passed
@danielnaab
danielnaab deleted the fix/access-request-admin-link branch December 4, 2026 14:16

This branch was previously deployed

1 inactive deployment
fix-access-request-admin-link — cfcf6ced Deployed Dec 3, 2026 by danielnaab
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.

1 participant