mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
feat: add confirmation modal when assigning admin:admins-mods privilege
This commit is contained in:
@@ -44,6 +44,7 @@
|
|||||||
"admin-settings": "Settings",
|
"admin-settings": "Settings",
|
||||||
|
|
||||||
"alert.confirm-moderate": "<strong>Are you sure you wish to grant the moderation privilege to this user group?</strong> This group is public, and any users can join at will.",
|
"alert.confirm-moderate": "<strong>Are you sure you wish to grant the moderation privilege to this user group?</strong> This group is public, and any users can join at will.",
|
||||||
|
"alert.confirm-admins-mods": "<strong>Are you sure you wish to grant the "Admins & Mods" privilege to this user/group?</strong> Users with this privilege are able to promote and demote other users into privileged positions, <em>including super administrator</em>",
|
||||||
"alert.confirm-save": "Please confirm your intention to save these privileges",
|
"alert.confirm-save": "Please confirm your intention to save these privileges",
|
||||||
"alert.saved": "Privilege changes saved and applied",
|
"alert.saved": "Privilege changes saved and applied",
|
||||||
"alert.confirm-discard": "Are you sure you wish to discard your privilege changes?",
|
"alert.confirm-discard": "Are you sure you wish to discard your privilege changes?",
|
||||||
|
|||||||
@@ -50,6 +50,15 @@ define('admin/manage/privileges', [
|
|||||||
checkboxEl.prop('checked', !checkboxEl.prop('checked'));
|
checkboxEl.prop('checked', !checkboxEl.prop('checked'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else if (privilege.endsWith('admin:admins-mods') && state) {
|
||||||
|
bootbox.confirm('[[admin/manage/privileges:alert.confirm-admins-mods]]', function (confirm) {
|
||||||
|
if (confirm) {
|
||||||
|
wrapperEl.attr('data-delta', delta);
|
||||||
|
Privileges.exposeAssumedPrivileges();
|
||||||
|
} else {
|
||||||
|
checkboxEl.prop('checked', !checkboxEl.prop('checked'));
|
||||||
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
wrapperEl.attr('data-delta', delta);
|
wrapperEl.attr('data-delta', delta);
|
||||||
Privileges.exposeAssumedPrivileges();
|
Privileges.exposeAssumedPrivileges();
|
||||||
|
|||||||
Reference in New Issue
Block a user