Show failed minify file and fix username editing privilege (#6445)

* Fix global mods and admins being unable to change usernames

* Message file which failed to minify
v1.18.x
Peter Jaszkowiak 7 years ago committed by Barış Soner Uşaklı
parent de9f429b89
commit ce09813bf0

@ -234,7 +234,7 @@ function minifyAndSave(data, callback) {
});
if (minified.error) {
return callback(minified.error);
return callback({ stack: 'Error minifying ' + minified.error.filename + '\n' + minified.error.stack });
}
async.parallel([

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

Loading…
Cancel
Save