diff --git a/.env b/.env index 9e0819d..7005828 100644 --- a/.env +++ b/.env @@ -20,9 +20,10 @@ APP_CRON=1 # NINEGATE NINEGATE_ACTIVATE=0 -NINEGATE_URL=http://192.168.0.22 +NINEGATE_URL=http://localhost NINEGATE_SECRET=changeme NINEGATE_MASTERIDENTITY=SQL +NINEGATE_MODEREGISTRATION=byadmin # CAS CAS_HOST= diff --git a/config/packages/twig.yaml b/config/packages/twig.yaml index c949f3b..9d4a3a2 100644 --- a/config/packages/twig.yaml +++ b/config/packages/twig.yaml @@ -12,4 +12,6 @@ twig: appAuth: '%appAuth%' appName: '%appName%' appCron: '%appCron%' - + appNinegateactivate: '%appNinegateactivate%' + appNinegateurl: '%appNinegateurl%' + appNinegatemoderegistration: '%appNinegatemoderegistration%' diff --git a/config/services.yaml b/config/services.yaml index 9a581f5..d02d1e4 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -19,6 +19,7 @@ parameters: appNinegateurl: '%env(resolve:NINEGATE_URL)%' appNinegatesecret: '%env(resolve:NINEGATE_SECRET)%' appNinegatemasteridentity: '%env(resolve:NINEGATE_MASTERIDENTITY)%' + appNinegatemoderegistration: '%env(resolve:NINEGATE_MODEREGISTRATION)%' casHost: '%env(resolve:CAS_HOST)%' casPort: '%env(resolve:CAS_PORT)%' diff --git a/docker-compose.yml b/docker-compose.yml index b33485b..88247d3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -35,7 +35,6 @@ services: - ./public/uploads:/app/public/uploads:delegated - ./misc:/app/misc:delegated - ./public/styles:/app/public/styles:delegated - adminer: image: adminer container_name: ninefolio-adminer diff --git a/src/Controller/HomeController.php b/src/Controller/HomeController.php index c6df18f..7808a9f 100755 --- a/src/Controller/HomeController.php +++ b/src/Controller/HomeController.php @@ -12,6 +12,7 @@ class HomeController extends AbstractController public function home() { $items=null; + dump($this->getParameter("appNinegateactivate")); if($this->getParameter("appNinegateactivate")) { // Entete $headers = ['Accept' => 'application/json', 'key' => $this->getParameter("appNinegatesecret"), 'only'=>'items']; @@ -29,7 +30,6 @@ class HomeController extends AbstractController catch (\Exception $e) { } } - dump($items); $em = $this->getDoctrine()->getManager(); $users = $em->getRepository("App:User")->findBy([],["pseudo"=>"ASC"]); diff --git a/templates/Home/home.html.twig b/templates/Home/home.html.twig index bef1bdd..2e1ae79 100644 --- a/templates/Home/home.html.twig +++ b/templates/Home/home.html.twig @@ -70,6 +70,12 @@ {% else %} + {% if(appNinegateurl and appNinegatemoderegistration!="none") %} + + + + {% endif %} + @@ -125,6 +131,12 @@ {% else %} + {% if(appNinegateurl and appNinegatemoderegistration!="none") %} + + + + {% endif %} + diff --git a/templates/Home/user.html.twig b/templates/Home/user.html.twig index f94e503..22d7897 100644 --- a/templates/Home/user.html.twig +++ b/templates/Home/user.html.twig @@ -87,6 +87,12 @@ {% else %} + {% if(appNinegateurl and appNinegatemoderegistration!="none") %} + + + + {% endif %} + @@ -141,6 +147,12 @@ {% else %} + {% if(appNinegateurl and appNinegatemoderegistration!="none") %} + + + + {% endif %} + diff --git a/templates/base.html.twig b/templates/base.html.twig index 704cdd2..862c75b 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -64,6 +64,12 @@ + {% elseif(appNinegateurl and appNinegatemoderegistration!="none") %} +