[Fix] Hide admin-only Slack/Linear connect cards from members - #869
Open
daniel-lxs wants to merge 1 commit into
Open
[Fix] Hide admin-only Slack/Linear connect cards from members#869daniel-lxs wants to merge 1 commit into
daniel-lxs wants to merge 1 commit into
Conversation
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>
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The home page onboarding cards "Chat with Roomote on Slack" and "Assign tasks to agents from Linear" in
OnboardingCard.tsxare shown to every signed-in user, but their "Do it" actions callslack.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" POSTsslack.connectApp, which returnsUnauthorized.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 becauseautomations.onboardingStatusthrows for non-admins.Verification
Verified locally against a running instance with the Slack installation deactivated:
check-types:fast, oxlint, and oxfmt pass.🤖 Generated with Claude Code