This commit is contained in:
afornerot 2024-11-03 10:12:33 +01:00
parent 571efe1ad9
commit 1e6f519aee
8 changed files with 37 additions and 4 deletions

3
.env
View File

@ -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=

View File

@ -12,4 +12,6 @@ twig:
appAuth: '%appAuth%'
appName: '%appName%'
appCron: '%appCron%'
appNinegateactivate: '%appNinegateactivate%'
appNinegateurl: '%appNinegateurl%'
appNinegatemoderegistration: '%appNinegatemoderegistration%'

View File

@ -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)%'

View File

@ -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

View File

@ -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"]);

View File

@ -70,6 +70,12 @@
<i class="fa fa-sign-out-alt fa-fw"></i>
</a>
{% else %}
{% if(appNinegateurl and appNinegatemoderegistration!="none") %}
<a href="{{appNinegateurl}}/registration?redirect={{app.request.uri}}" class="btn btn-link" title="Inscription">
<i class="fa fa-user-plus fa-fw"></i>
</a>
{% endif %}
<a href={{ path("app_login") }} class="btn btn-link" title="Connexion">
<i class="fa fa-sign-in-alt fa-fw"></i>
</a>
@ -125,6 +131,12 @@
<i class="fa fa-sign-out-alt fa-fw"></i>
</a>
{% else %}
{% if(appNinegateurl and appNinegatemoderegistration!="none") %}
<a href="{{appNinegateurl}}/registration?redirect={{app.request.uri}}" class="btn btn-link" title="Inscription">
<i class="fa fa-user-plus fa-fw"></i>
</a>
{% endif %}
<a href={{ path("app_login") }} class="btn btn-link" title="Connexion">
<i class="fa fa-sign-in-alt fa-fw"></i>
</a>

View File

@ -87,6 +87,12 @@
<i class="fa fa-sign-out-alt fa-fw"></i>
</a>
{% else %}
{% if(appNinegateurl and appNinegatemoderegistration!="none") %}
<a href="{{appNinegateurl}}/registration?redirect={{app.request.uri}}" class="btn btn-link" title="Inscription">
<i class="fa fa-user-plus fa-fw"></i>
</a>
{% endif %}
<a href={{ path("app_login") }} class="btn btn-link" title="Connexion">
<i class="fa fa-sign-in-alt fa-fw"></i>
</a>
@ -141,6 +147,12 @@
<i class="fa fa-sign-out-alt fa-fw"></i>
</a>
{% else %}
{% if(appNinegateurl and appNinegatemoderegistration!="none") %}
<a href="{{appNinegateurl}}/registration?redirect={{app.request.uri}}" class="btn btn-link" title="Inscription">
<i class="fa fa-user-plus fa-fw"></i>
</a>
{% endif %}
<a href={{ path("app_login") }} class="btn btn-link" title="Connexion">
<i class="fa fa-sign-in-alt fa-fw"></i>
</a>

View File

@ -64,6 +64,12 @@
<img src="{{app.user.avatar|urlavatar}}" class="avatar">
</a>
</li>
{% elseif(appNinegateurl and appNinegatemoderegistration!="none") %}
<li>
<a href="{{appNinegateurl}}/registration">
<i class="fa fa-user-plus fa-fw"></i>
</a>
</li>
{% endif %}
{% if is_granted('ROLE_ADMIN') %}