mirror of
https://github.com/wassname/talk.git
synced 2026-07-21 12:51:03 +08:00
[CORL-1121] Remove username validation when updated by admin (#2986)
* Use SSO validation for updateUserUsername CORL-1121 * Remove validation on admin-only user rename We don't need to validate the user-name as only admin's will be using this mutator. If they're updating things incorrectly, that's up to them to manage with this flow. CORL-1121
This commit is contained in:
@@ -5,7 +5,6 @@ import {
|
||||
USERNAME_MIN_LENGTH,
|
||||
USERNAME_REGEX,
|
||||
} from "coral-common/helpers/validate";
|
||||
|
||||
import {
|
||||
EmailExceedsMaxLengthError,
|
||||
EmailInvalidFormatError,
|
||||
|
||||
@@ -630,9 +630,6 @@ export async function updateUsernameByID(
|
||||
username: string,
|
||||
createdBy: User
|
||||
) {
|
||||
// Validate the username.
|
||||
validateUsername(username);
|
||||
|
||||
return updateUserUsername(mongo, tenant.id, userID, username, createdBy.id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user