예제 #1
0
 public function behaviors()
 {
     return ['access' => ['class' => AccessControl::className(), 'only' => ['logout', 'agents', 'operator'], 'rules' => [['actions' => ['logout', 'agents'], 'allow' => true, 'roles' => ['@'], 'matchCallback' => function ($rule, $action) {
         return PermissionHelpers::requireAgent();
     }], ['actions' => ['logout', 'operator'], 'allow' => true, 'roles' => ['@'], 'matchCallback' => function ($rule, $action) {
         return PermissionHelpers::requireOperator();
     }]]], 'verbs' => ['class' => VerbFilter::className(), 'actions' => ['logout' => ['post']]]];
 }
예제 #2
0
 public function behaviors()
 {
     return ['access' => ['class' => AccessControl::className(), 'only' => ['index', 'create', 'change', 'confirmed', 'processing', 'annulation', 'failure', 'list', 'reports', 'datas', 'comission', 'change_password', 'responder_settings', 'back_connect'], 'rules' => [['actions' => ['index', 'create', 'change', 'confirmed', 'processing', 'annulation', 'failure', 'list', 'reports', 'datas', 'comission', 'change_password', 'responder_settings', 'back_connect'], 'allow' => true, 'roles' => ['@'], 'matchCallback' => function ($rule, $action) {
         return PermissionHelpers::requireAgent();
     }]]], 'verbs' => ['class' => VerbFilter::className(), 'actions' => ['logout' => ['post']]]];
 }