From 7743e4509c57d66210630b90e187ae496696d417 Mon Sep 17 00:00:00 2001 From: viown <48097677+viown@users.noreply.github.com> Date: Sun, 16 Mar 2025 23:00:38 +0300 Subject: [PATCH] Remove isPreviouslyAdmin check --- src/apps/dashboard/routes/users/profile.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/apps/dashboard/routes/users/profile.tsx b/src/apps/dashboard/routes/users/profile.tsx index 3ed20b293a..e385d6cb74 100644 --- a/src/apps/dashboard/routes/users/profile.tsx +++ b/src/apps/dashboard/routes/users/profile.tsx @@ -199,8 +199,6 @@ const UserEdit = () => { throw new Error('Unexpected null user id or policy'); } - const isPreviouslyAdmin = user.Policy.IsAdministrator; - user.Name = (page.querySelector('#txtUserName') as HTMLInputElement).value.trim(); user.Policy.IsAdministrator = (page.querySelector('.chkIsAdmin') as HTMLInputElement).checked; user.Policy.IsHidden = (page.querySelector('.chkIsHidden') as HTMLInputElement).checked; @@ -227,7 +225,7 @@ const UserEdit = () => { user.Policy.EnableContentDeletionFromFolders = user.Policy.EnableContentDeletion ? [] : getCheckedElementDataIds(page.querySelectorAll('.chkFolder')); user.Policy.SyncPlayAccess = (page.querySelector('#selectSyncPlayAccess') as HTMLSelectElement).value as SyncPlayUserAccessType; - if (!user.HasPassword && user.Policy.IsAdministrator && !isPreviouslyAdmin) { + if (!user.HasPassword && user.Policy.IsAdministrator) { toast(globalize.translate('PasswordAdminRequired')); loading.hide(); return;