-
Notifications
You must be signed in to change notification settings - Fork 875
fix: filter "add group member" by organization #14404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
8b7185d
to
49a709f
Compare
This is accomplished by using the members endpoint instead of the users endpoint, and to that end the UserAutocomplete component has been reworked to support either endpoint as separate components with a shared base.
49a709f
to
60e165c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good to me and works as expected, but I’m missing an integration test to make this behavior more intentional and to prevent us from accidentally removing or replacing it in the future.
Fair, let me add one on the group page. |
This ensures it is using the right endpoint for the add member dropdown.
824b581
to
fd02c23
Compare
@BrunoQuaresma I added a Storybook testing the integration but do you know if there is a way to mock errors with react-query? I see we use I could also split it off into a view and then test that instead. |
I figured out a way to do it, but let me know if there is a better way |
0bfabe0
to
fe2f523
Compare
fe2f523
to
a043653
Compare
@code-asher it looks good enough for me 🚢 it |
This is accomplished by using the members endpoint instead of the users endpoint, and to that end the UserAutocomplete component has been reworked to support either endpoint as separate components with a shared base.
This only affects the group page under organizations, the original one (which shows when the multi-org experiment is disabled) remains unaffected. The org group page dropdown should now only show users belonging to the organization instead of all the users in the deployment.
Closes #13915