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
Error when updating display name and avatar URL #15663
Comments
Heads up @tsenart - the "team/cloud" label was applied to this issue. |
Going to pick this up. |
What I think is happening is that the sourcegraph/cmd/frontend/graphqlbackend/user.go Lines 338 to 347 in d37737a
If the user is a site admin or it's a user updating themselves, nothing is returned from /cc @unknwon |
|
…ite config prohibits username changes Non-admin users are currently prevented from updating their display name and avatar URL if the site configuration prohibits username changes. There are a number of additional factors in play: 1. The UI will always include `username` in the mutation payload. 2. That triggers the `viewerCanChangeUsername` check, since `args.Username` is not null. 3. `viewerCanChangeUsername` falls through to the final site admin check, and the request fails. The test was written first to demonstrate a failing case, and then `viewerIsChangingUsername` was introduced to short circuit if appropriate. fixes #15663
…ite config prohibits username changes Non-admin users are currently prevented from updating their display name and avatar URL if the site configuration prohibits username changes. There are a number of additional factors in play: 1. The UI will always include `username` in the mutation payload. 2. That triggers the `viewerCanChangeUsername` check, since `args.Username` is not null. 3. `viewerCanChangeUsername` falls through to the final site admin check, and the request fails. The test was written first to demonstrate a failing case, and then `viewerIsChangingUsername` was introduced to short circuit if appropriate. fixes #15663
…ite config prohibits username changes (#15693) Non-admin users are currently prevented from updating their display name and avatar URL if the site configuration prohibits username changes. There are a number of additional factors in play: 1. The UI will always include `username` in the mutation payload. 2. That triggers the `viewerCanChangeUsername` check, since `args.Username` is not null. 3. `viewerCanChangeUsername` falls through to the final site admin check, and the request fails. The test was written first to demonstrate a failing case, and then `viewerIsChangingUsername` was introduced to short circuit if appropriate. fixes #15663
Steps to reproduce:
Expected behavior:
Saves successfully and updates display name and avatar
Actual behavior:
Receives
Error: unable to change username because auth.enableUsernameChanges is false in site configuration
Customer support ticket: https://sourcegraph.atlassian.net/jira/servicedesk/projects/SG/queues/custom/2/SG-420
The text was updated successfully, but these errors were encountered: