Skip to content
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

Prevent accidental user overwrites #21

Closed
aine-etke opened this issue Sep 9, 2024 · 0 comments
Closed

Prevent accidental user overwrites #21

aine-etke opened this issue Sep 9, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@aine-etke
Copy link
Member

Synapse Admin API provides Create or modify API endpoint that allows overwriting existing users by default.

Sometimes, you may want such functionality, but there is a huge change that in the vast majority of cases that will lead to accidental/unexpected overwrites. This issue was already raised in Awesome-Technologies/synapse-admin#176, Awesome-Technologies/synapse-admin#467, and matrix-org/synapse#8165, but the API endpoint was not changed.

Luckily, a new endpoint was added to the Synapse Admin API, that can be used to prevent unexpected users overwrite: https://element-hq.github.io/synapse/latest/admin_api/user_admin_api.html#check-username-availability

Please, make Synapse Admin to call that endpoint before creating a new user, and if there is already existing user with this username, show a modal window with "Warning! This username is already taken. Are you certain that you intend to overwrite the existing user?" alert and options to continue (i.e., send the request), and cancel.

It would be amazing if that check could be added to the new user form near the Username field as well, so when you're entering the username, you will see something like "✔️ username is available" and "⚠️ username is already taken" messages near the input field

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants