From 3a21329c5e691e3fd8c234c1253fe893ccc5a502 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Mon, 22 Jun 2015 16:03:32 -0400 Subject: [PATCH] allow admins to remove themselves as admin but only if they are not the last admin left --- src/socket.io/admin/user.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/socket.io/admin/user.js b/src/socket.io/admin/user.js index 60494ca6e1..4625226c2b 100644 --- a/src/socket.io/admin/user.js +++ b/src/socket.io/admin/user.js @@ -38,10 +38,6 @@ User.removeAdmins = function(socket, uids, callback) { return callback(new Error('[[error:invalid-data]]')); } - if (uids.indexOf(socket.uid.toString()) !== -1) { - return callback(new Error('[[error:cant-remove-self-as-admin]]')); - } - async.eachSeries(uids, function(uid, next) { groups.getMemberCount('administrators', function(err, count) { if (err) {