Skip to content

[Fix] Hide admin-only Slack/Linear connect cards from members - #869

Open
daniel-lxs wants to merge 1 commit into
developfrom
fix/member-admin-gated-onboarding-cards
Open

[Fix] Hide admin-only Slack/Linear connect cards from members#869
daniel-lxs wants to merge 1 commit into
developfrom
fix/member-admin-gated-onboarding-cards

Conversation

@daniel-lxs

Copy link
Copy Markdown
Member

Problem

The home page onboarding cards "Chat with Roomote on Slack" and "Assign tasks to agents from Linear" in OnboardingCard.tsx are shown to every signed-in user, but their "Do it" actions call slack.connectApp / linear.connectApp, which are admin-gated server-side (assertAdminResult) and return { success: false, error: 'Unauthorized' } for members. A member clicking "Do it" hits a dead end with no path forward.

Repro: with a role='member' user and no active Slack installation, load / — the Slack card shows, and clicking "Do it" POSTs slack.connectApp, which returns Unauthorized.

Fix

Gate both cards on isAdmin (already available in the component), consistent with how the deployment-scoped MCP cards in the same file are gated. Members instead see the next applicable card (e.g. the member-appropriate "Link your GitHub so Roomote acts as you").

Other cards in the file were checked for the same pattern: the GitHub link card uses the non-admin-gated personal linking mutation, the promoted MCP cards already filter deployment-scoped integrations on isAdmin, and the automations card is already effectively hidden for members because automations.onboardingStatus throws for non-admins.

Verification

Verified locally against a running instance with the Slack installation deactivated:

  • Admin: the Slack card still appears (no regression).
  • Member: the Slack and Linear cards no longer appear; the GitHub link card correctly takes their place.
  • check-types:fast, oxlint, and oxfmt pass.

🤖 Generated with Claude Code

The home page onboarding cards "Chat with Roomote on Slack" and "Assign
tasks to agents from Linear" were visible to all users, but their actions
call slack.connectApp / linear.connectApp, which are admin-gated and
return Unauthorized for members. A member clicking "Do it" hit a silent
dead end. Gate both cards on isAdmin, consistent with the
deployment-scoped MCP cards in the same component.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@roomote-roomote

roomote-roomote Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

No code issues found. See task

Reviewed 5a1ddb1

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