mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 03:01:08 +01:00
closes #4800
This commit is contained in:
@@ -34,10 +34,10 @@ module.exports = function(Posts) {
|
||||
return next(new Error('[[error:post-already-restored]]'));
|
||||
}
|
||||
|
||||
privileges.posts.canEdit(pid, uid, next);
|
||||
privileges.posts.canDelete(pid, uid, next);
|
||||
},
|
||||
function (canEdit, next) {
|
||||
if (!canEdit) {
|
||||
function (canDelete, next) {
|
||||
if (!canDelete) {
|
||||
return next(new Error('[[error:no-privileges]]'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user