2021-12-24, 04:44 PM
Hm, I think that would actually be classed as a bug to be honest.
This is from inc/datahandlers/post.php:
Where it checks mod_edit_posts and !$ismod, $ismod is whether the post author is a moderator. I would have thought this should be if the user is a moderator (or maybe both). It's been like this for 8 years though so not been noticed before.
This is from inc/datahandlers/post.php:
if(isset($post['uid']))
{
$uid = $post['uid'];
}
else
{
$uid = 0;
}
$forum = get_forum($post['fid']);
$forumpermissions = forum_permissions($post['fid'], $uid);
// Decide on the visibility of this post.
$ismod = is_moderator($post['fid'], "", $uid);
// Keep visibility for unapproved and deleted posts
if($existing_post['visible'] == 0)
{
$visible = 0;
}
elseif($existing_post['visible'] == -1)
{
$visible = -1;
}
elseif($forumpermissions['mod_edit_posts'] == 1 && !$ismod)
{
$visible = 0;
require_once MYBB_ROOT."inc/class_moderation.php";
$moderation = new Moderation;
$moderation->unapprove_posts(array($post['pid']));
}
else
{
$visible = 1;
}
Where it checks mod_edit_posts and !$ismod, $ismod is whether the post author is a moderator. I would have thought this should be if the user is a moderator (or maybe both). It's been like this for 8 years though so not been noticed before.