Repository navigation
Conversation
Display each member's Cursor role as a badge in the settings member list and on the user detail page, with owners highlighted in orange like the other badges. getGroupsWithMembers now returns the role from members. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add an opt-in access control that follows Cursor roles. Setting RESTRICTED_FEATURES to a comma-separated list reserves those features to unrestricted users. A value also restricts its dotted sub-values and *.actions covers every .actions value. Nothing is restricted by default. Cursor owners and free-owners, plus the emails in AUTH_UNRESTRICTED_EMAILS, are never restricted. Members, emails without a Cursor account and anonymous visitors are, and the role shown in the UI is unchanged. The overview and the routes it relies on stay open. Values: insights, anomalies, anomalies.actions (Ack/Resolve), user-details (other members' pages, the person's own page stays available), settings and settings.actions (read-only Settings). The proxy maps each request to a feature and answers 403 for the API or redirects pages to the overview. The nav hides restricted pages, links to other members are greyed out, and the Settings and anomaly actions are hidden when restricted. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The matcher excluded any path containing ".svg" because the pattern was not anchored, so a request like PATCH /api/incidents/5.svg skipped the proxy and with it the login redirect and the access checks, while the incidents route still parsed the id as 5. The app serves no SVG files, so drop the exclusion and add a regression test. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Tested this at 1bc33a1. Typecheck, lint, all 31 tests and the production build pass locally on Node 22. One access-control gap before merging: Please map Leaving this open for that fix. No production access settings have been changed. |
/api/analytics returned the Insights payload (including client version users) to restricted and anonymous viewers while /insights redirected. Map it to the insights feature and test the proxy response itself. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The overview fetched /api/analytics, the full Insights payload, only to filter members by plan exhaustion day. Return the few fields it needs from getFullDashboard instead, so the filter needs no extra request. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Good catch, thanks. Pushed two commits:
I haven't rerun the production build. One question: restricted viewers can now see a "days to exhaust" number per email through the Overview. I think that's fine, but tell me if you'd rather gate it. |
Summary
Adds an opt-in way to reserve parts of the dashboard to Cursor owners. Nothing changes unless
RESTRICTED_FEATURESis set.What's new
1. Cursor role badge
The settings member list and the user detail page show each member's Cursor role, with owners highlighted.
2.
RESTRICTED_FEATURESA comma-separated list of features reserved to unrestricted users:
insights,anomalies,anomalies.actions,user-details,settings,settings.actions. A value also covers its dotted sub-values, and*.actionscovers every.actionsvalue.AUTH_UNRESTRICTED_EMAILS, are unrestricted. The role shown in the UI always comes from Cursor.settings.actionsmakes Settings read-only.3. Proxy matcher
The matcher skipped any path containing
.svg. The app serves no SVG files, so the exclusion is removed and the proxy now runs on every route. A test is added.Checks
npm run typecheck,npm run lintandnpm testpass.🤖 Generated with Claude Code