Skip to content

Fix misleading permissions message for Guest users in MCP - #7894

Open
labkey-gokhano wants to merge 1 commit into
developfrom
fb_mcp_guest_permission_message
Open

Fix misleading permissions message for Guest users in MCP#7894
labkey-gokhano wants to merge 1 commit into
developfrom
fb_mcp_guest_permission_message

Conversation

@labkey-gokhano

Copy link
Copy Markdown
Contributor

Rationale

User.getPermissionsRestrictions() unconditionally returned "Current user has unrestricted permissions..." for any user not wrapped as a PermissionsRestrictedUser, which is backwards for Guest — Guest is normally the least-privileged account on a server, not an unrestricted one. This surfaced via the MCP whereAmIWhoAmITalkingTo tool: a connector configured with no API key authenticates as Guest and was told it had "unrestricted permissions" instead of being pointed at a scoped API key.

Related Pull Requests

None

Changes

  • User.getPermissionsRestrictions() now checks isGuest() first and returns a Guest-specific message: "You have been connected as a Guest user with limited permissions. Please use an API Key with at least Read access permissions for a richer experience."

…hoAmITalkingTo

Guest previously received the generic "unrestricted permissions" warning meant for unrestricted API keys, which is backwards since Guest is typically the least-privileged account on a server.
@labkey-susanh
labkey-susanh removed their request for review July 30, 2026 00:19
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