[ '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() { $producerManager = $this->getProducerManager(); $versionsArray = Opendistrib::getVersions(); $versionsRenderArray = []; foreach ($versionsArray as $version) { $versionsRenderArray[$version] = [ 'version' => $version, 'content' => $this->renderFile('@common/versions/' . $version . '.php', [ 'userCurrent' => $this->getUserCurrent() ]) ]; } $producerManager->updateOpendistribVersion($this->getProducerCurrent()); return $this->render('index', [ 'versionsArray' => $versionsRenderArray ]); } }