Hi, I would first like to thank you for providing this awesome extension. I haven’t had much time with php and even less time with yii so I hope you can bear with me.
While following the documentation I ran into the following:
public function filters()
{
return array(
array('auth.components.AuthFilter'),
)[color="#FF0000"],[/color]
}
I am not really sure if this is a typo but the comma(,) after the last parenthesis should be replaced by a semicolon (
? (just want to make sure since I got errors with the comma)
Also I got an error:
protected\modules\auth\components\AuthFilter.php(41): YiiBase::t("AuthModule.main", "Access denied.")
$itemName .= '.' . $controller->action->getId();
if ($user->checkAccess($itemName))
return true;
throw new CHttpException(401, Yii::t('AuthModule.main', 'Access denied.'));
}
}
I am not really sure why it caused the error but I tried replacing it with:
throw new CHttpException(401,‘Access denied.’);
This seemed to fix the error but now only the superuser had access to the tasks (although other roles were configured to have permission).
In the end, instead of using array(‘auth.components.AuthFilter’) I tried using ‘rights’ (filter from your Rights Extension extending Rcontroller). Although I haven’t tested it much it seems to work perfectly.
Again I haven’t had much time with php and yii so maybe everything I said might be completely wrong.