[ 'class' => AccessControl::class, 'rules' => [ [ 'allow' => true, 'roles' => ['@'], 'matchCallback' => function ($rule, $action) { return $this->getUserModule() ->getAuthorizationChecker() ->isGrantedAsProducer($this->getUserCurrent()); } ] ], ], ]; } /** * Liste les versions d'Opendistrib */ public function actionIndex() { $producerModule = $this->getProducerModule(); $versionsArray = Opendistrib::getVersions(); $versionsRenderArray = []; foreach ($versionsArray as $version) { $versionsRenderArray[$version] = [ 'version' => $version, 'content' => $this->renderFile('@common/versions/' . $version . '.php', [ 'userCurrent' => $this->getUserCurrent() ]) ]; } $producerModule->updateOpendistribVersion($this->getProducerCurrent()); return $this->render('index', [ 'versionsArray' => $versionsRenderArray ]); } }