nocte
Well-known member
e.g. action View in Member Controller:
and ProfilePost Entity:
This seem to happen in all Controllers that use inline moderation.
Why is not
Edit: oh, I think I found the reason. We also need the Permission for the "check all" checkbox and such things..
PHP:
$canInlineMod = false;
foreach ($profilePosts AS $profilePost)
{
if ($profilePost->canUseInlineModeration())
{
$canInlineMod = true;
break;
}
}
$viewParams = [
'user' => $user,
'profilePosts' => $profilePosts,
'canInlineMod' => $canInlineMod,
'page' => $page,
'perPage' => $perPage,
'total' => $total
];
and ProfilePost Entity:
PHP:
public function canUseInlineModeration(&$error = null)
{
$visitor = \XF::visitor();
return ($visitor->user_id && $visitor->hasPermission('profilePost', 'inlineMod'));
}
Why is not
profilePosts.canUseInlineModeration()
used in the templates like it is with other permissions done?Edit: oh, I think I found the reason. We also need the Permission for the "check all" checkbox and such things..