Matt C.
Well-known member
Would someone mind taking a look at this for me? I feel like I'm losing my mind, because this should not be this difficult. Probably something really simple I'm overlooking:
I can't get these permission checks to resolve. I've double checked everything.

No matter what, page comes back with the permission error.
Thank you.
I can't get these permission checks to resolve. I've double checked everything.
Code:
public function actionIndex(\XF\Mvc\ParameterBag $params)
{
$visitor = \XF::visitor();
if (!$visitor->hasPermission('mc_vgrc', 'view')) {
return $this->error(\XF::phrase('mc_vgrc_you_dont_have_permission_to_view_the_release_calendar'));
}
$viewParams = [
'canDownload' => $visitor->hasPermission('mc_vgrc', 'download'),
];
return $this->view('MC\VGReleaseCalendar:Calendar', 'mc_vgrc_index', $viewParams);
}

No matter what, page comes back with the permission error.
Thank you.
Last edited: