From 6c818016fee134e653bea78e6d29e6bb495d44fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sun, 29 Apr 2018 17:42:29 -0400 Subject: [PATCH] backport username/email change privilege fix --- src/socket.io/user/profile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/socket.io/user/profile.js b/src/socket.io/user/profile.js index 9d88713028..1391ba2f3c 100644 --- a/src/socket.io/user/profile.js +++ b/src/socket.io/user/profile.js @@ -90,7 +90,7 @@ module.exports = function (SocketUser) { return next(new Error('[[error:no-privileges]]')); } - if ((!results.isAdmin || !results.isGlobalMod) && !isSelf) { + if (!isSelf && !(results.isAdmin || results.isGlobalMod)) { return next(new Error('[[error:no-privileges]]')); }