privilege fixes

This commit is contained in:
barisusakli
2016-08-10 23:55:49 +03:00
parent 73e19fa13a
commit 56d325bd86
8 changed files with 36 additions and 34 deletions

View File

@@ -37,8 +37,8 @@ module.exports = function(Posts) {
privileges.posts.canDelete(pid, uid, next);
},
function (canDelete, next) {
if (!canDelete) {
return next(new Error('[[error:no-privileges]]'));
if (!canDelete.flag) {
return next(new Error(canDelete.message));
}
if (isDelete) {