Repository navigation
fix(login): show only the user's workspaces and accept names - #103
Merged
Merged
Conversation
The workspace picker read /workspaces, which lists every workspace of the organization to its members. Read /users/me instead, which only lists the workspaces the user has a role in (all of them for org admins). Both the organization and workspace prompts now accept a name as well as a number, and re-prompt on an unknown entry. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
volkanarisli
approved these changes
Oct 23, 2026
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.
What
haystack-enterprise login(OAuth path):GET /api/v1/workspaces, which returns every workspace of the organization to org members. It now readsGET /api/v1/users/me→organization.workspaces, which lists only the workspaces the user holds a role in (all of them for org admins). A user with access to a single workspace is no longer prompted.2stays reachable.The organization list needed no change:
/api/v1/sso/organizationsalready returns only the orgs the user is a member of (same endpoint the UI uses).Follow-up
The
/api/v1/workspacesbehaviour itself lives in hep and also drives the UI workspace switcher; tracked separately.Tests
test_login_with_oauthfor/users/me.test_login_with_oauth_picks_by_name(pick by name, invalid entry and out-of-range number re-prompt).make types,make all-fixclean.🤖 Generated with Claude Code
https://claude.ai/code/session_016g6JRrEa3sMZSfJFj7WUzt