From 96f46f6e6dcee61e672eca204a3b9434591b7eb7 Mon Sep 17 00:00:00 2001 From: Thorsten Rinne Date: Wed, 8 Jan 2025 10:15:14 +0100 Subject: [PATCH] fix: avoid disable permissions of super users, closes #3318 --- phpmyfaq/admin/assets/src/user/users.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/phpmyfaq/admin/assets/src/user/users.js b/phpmyfaq/admin/assets/src/user/users.js index 41fb9fb939..d788ac6fc8 100644 --- a/phpmyfaq/admin/assets/src/user/users.js +++ b/phpmyfaq/admin/assets/src/user/users.js @@ -57,6 +57,7 @@ const setUserData = async (userId) => { element.setAttribute('disabled', ''); }); document.getElementById('checkAll').setAttribute('disabled', ''); + document.getElementById('uncheckAll').setAttribute('disabled', ''); } else { const superAdmin = document.getElementById('is_superadmin'); superAdmin.removeAttribute('checked'); @@ -149,14 +150,16 @@ export const handleUsers = async () => { element.setAttribute('disabled', ''); }); document.getElementById('checkAll').setAttribute('disabled', ''); + document.getElementById('uncheckAll').setAttribute('disabled', ''); } else { document.querySelectorAll('.permission').forEach((checkbox) => { checkbox.removeAttribute('disabled'); }); document.querySelectorAll('#pmf-user-rights-save').forEach((element) => { - element.removeAttribute('disabled', ''); + element.removeAttribute('disabled'); }); - document.getElementById('checkAll').removeAttribute('disabled', ''); + document.getElementById('checkAll').removeAttribute('disabled'); + document.getElementById('uncheckAll').removeAttribute('disabled'); } }); }