[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:
Nick Funk
2020-06-10 19:36:56 -04:00
committed by GitHub
parent c19f4a35ca
commit 2f03b788a4
2 changed files with 0 additions and 4 deletions
@@ -5,7 +5,6 @@ import {
USERNAME_MIN_LENGTH,
USERNAME_REGEX,
} from "coral-common/helpers/validate";
import {
EmailExceedsMaxLengthError,
EmailInvalidFormatError,
-3
View File
@@ -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);
}