From e93c48bec4bcc78bb756b798943f448b814ff465 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Tue, 6 Jun 2023 20:37:21 -0400 Subject: [PATCH] fix(striker-ui-api): don't allow admin to change username --- striker-ui-api/src/lib/request_handlers/user/updateUser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/striker-ui-api/src/lib/request_handlers/user/updateUser.ts b/striker-ui-api/src/lib/request_handlers/user/updateUser.ts index b870b87d..aedbcaff 100644 --- a/striker-ui-api/src/lib/request_handlers/user/updateUser.ts +++ b/striker-ui-api/src/lib/request_handlers/user/updateUser.ts @@ -112,7 +112,7 @@ export const updateUser: RequestHandler< } } - if (userName.length && userName !== xUserName) { + if (userName.length && xUserName !== 'admin' && userName !== xUserName) { assigns.push(`user_name = '${userName}'`); }