1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Remove isPreviouslyAdmin check

This commit is contained in:
viown 2025-03-16 23:00:38 +03:00
parent cbe213710d
commit 7743e4509c

View file

@ -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;