/** * @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]]]]]; }
/** * @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]]]]]; }