Skip to content

Password-reset link not rendered for non-admin users

Created by: slimsag

A (non-customer) user reported having trouble resetting their password, from which I discovered this.

When using builtin auth, the password reset page link is not rendered for non-admin users on the settings page due to this conditional:

https://sourcegraph.com/github.com/sourcegraph/sourcegraph@9f1dcaf/-/blob/web/src/user/settings/sidebaritems.ts#L15-21

This is likely due to a regression in the behavior added a year ago in e5c49ff8fdd331ca01dda477b0ddc38d37c79efa in which non-admin users could list auth providers (which at first glance sounds like the wrong approach to me, and I assume probably to someone else who then made them listable by admins only -- thus breaking this)

Workaround: users can still navigate to the page directly via https://sourcegraph.com/settings/password which will redirect them to the appropriate page as long as they are signed in already.