Ejemplo n.º 1
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['access' => ['class' => AccessControl::className(), 'ruleConfig' => ['class' => AccessRule::className()], 'rules' => [['actions' => ['error'], 'allow' => true], ['actions' => ['index', 'create', 'update', 'report', 'mark-delete'], 'allow' => true, 'roles' => [User::ROLE_ADMINISTRATOR, User::ROLE_MANAGER, User::ROLE_STOREKEEPER, User::ROLE_DRIVER]], ['actions' => ['delete'], 'allow' => true, 'roles' => [User::ROLE_ADMINISTRATOR]]]]];
 }
Ejemplo n.º 2
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['access' => ['class' => AccessControl::className(), 'ruleConfig' => ['class' => AccessRule::className()], 'rules' => [['actions' => ['error'], 'allow' => true], ['actions' => ['index', 'create', 'update', 'delete'], 'allow' => true, 'roles' => [User::ROLE_ADMINISTRATOR]]]]];
 }