backport username/email change privilege fix

This commit is contained in:
Barış Soner Uşaklı
2018-04-29 17:42:29 -04:00
committed by GitHub
parent 9d0802edd3
commit 6c818016fe

View File

@@ -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]]'));
}