mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 18:16:17 +01:00
fix: dont display post tools if there are no options
This commit is contained in:
@@ -138,7 +138,10 @@ module.exports = function (Topics) {
|
||||
post.display_delete_tools = topicPrivileges.isAdminOrMod || (post.selfPost && topicPrivileges['posts:delete']);
|
||||
post.display_moderator_tools = post.display_edit_tools || post.display_delete_tools;
|
||||
post.display_move_tools = topicPrivileges.isAdminOrMod && post.index !== 0;
|
||||
post.display_post_menu = topicPrivileges.isAdminOrMod || (post.selfPost && !topicData.locked) || ((loggedIn || topicData.postSharing.length) && !post.deleted);
|
||||
post.display_post_menu = topicPrivileges.isAdminOrMod ||
|
||||
(post.selfPost && !topicData.locked && !post.deleted) ||
|
||||
(post.selfPost && post.deleted && parseInt(post.deleterUid, 10) === parseInt(topicPrivileges.uid, 10)) ||
|
||||
((loggedIn || topicData.postSharing.length) && !post.deleted);
|
||||
post.ip = topicPrivileges.isAdminOrMod ? post.ip : undefined;
|
||||
|
||||
posts.modifyPostByPrivilege(post, topicPrivileges);
|
||||
|
||||
Reference in New Issue
Block a user