mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
fixes #6726
This commit is contained in:
@@ -39,6 +39,9 @@ module.exports = function (SocketPosts) {
|
||||
canDelete: function (next) {
|
||||
privileges.posts.canDelete(data.pid, socket.uid, next);
|
||||
},
|
||||
canPurge: function (next) {
|
||||
privileges.posts.canPurge(data.pid, socket.uid, next);
|
||||
},
|
||||
canFlag: function (next) {
|
||||
privileges.posts.canFlag(data.pid, socket.uid, next);
|
||||
},
|
||||
@@ -62,6 +65,7 @@ module.exports = function (SocketPosts) {
|
||||
posts.selfPost = socket.uid && socket.uid === parseInt(posts.uid, 10);
|
||||
posts.display_edit_tools = results.canEdit.flag;
|
||||
posts.display_delete_tools = results.canDelete.flag;
|
||||
posts.display_purge_tools = results.canPurge;
|
||||
posts.display_flag_tools = socket.uid && !posts.selfPost && results.canFlag.flag;
|
||||
posts.display_moderator_tools = posts.display_edit_tools || posts.display_delete_tools;
|
||||
posts.display_move_tools = results.isAdmin || results.isModerator;
|
||||
|
||||
Reference in New Issue
Block a user