Hello Friends
I created a code using AccessControl, I use the caracter @ to only logged users access the actions. But on my table user I create status to each user, how can I define whats actions the user can access on my controller based on user’s status?
This is my code AccessControl:
return [
'access' => [
'class' => AccessControl::className(),
'only' => ['action1','action2','action3'],
'rules' => [
[
'actions' => ['action1','action2','action3'],
'allow' => true,
'roles' => ['@'],
],
],
],
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'logout' => ['post','get'],
],
],
];
So I need that the usar that has a status ‘x’ access only action1, the user that has statys ‘y’ access all actions, the user that has status ‘z’ access action1 and action2.
Is it possible?