mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 18:56:15 +01:00
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
This commit is contained in:
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]]'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user