mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-06 23:27:56 +02:00
closes #3913
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
"use strict";
|
||||
/* global config, socket, define, templates, bootbox, app, ajaxify, */
|
||||
/* global config, socket, define, templates, bootbox, app, ajaxify */
|
||||
define('admin/manage/users', ['admin/modules/selectable'], function(selectable) {
|
||||
var Users = {};
|
||||
|
||||
Users.init = function() {
|
||||
var yourid = ajaxify.data.yourid;
|
||||
|
||||
selectable.enable('#users-container', '.user-selectable');
|
||||
|
||||
function getSelectedUids() {
|
||||
@@ -94,7 +92,7 @@ define('admin/manage/users', ['admin/modules/selectable'], function(selectable)
|
||||
return;
|
||||
}
|
||||
|
||||
if (uids.indexOf(yourid) !== -1) {
|
||||
if (uids.indexOf(app.user.uid.toString()) !== -1) {
|
||||
app.alertError('You can\'t remove yourself as Administrator!');
|
||||
} else {
|
||||
socket.emit('admin.user.makeAdmins', uids, done('User(s) are now administrators.', '.administrator', true));
|
||||
@@ -108,7 +106,7 @@ define('admin/manage/users', ['admin/modules/selectable'], function(selectable)
|
||||
return;
|
||||
}
|
||||
|
||||
if (uids.indexOf(yourid.toString()) !== -1) {
|
||||
if (uids.indexOf(app.user.uid.toString()) !== -1) {
|
||||
app.alertError('You can\'t remove yourself as Administrator!');
|
||||
} else {
|
||||
bootbox.confirm('Do you really want to remove admins?', function(confirm) {
|
||||
|
||||
Reference in New Issue
Block a user