From 07ef506fd4dd74f3d298e551424c26045133e589 Mon Sep 17 00:00:00 2001
From: Nicolas Dubois <nicolas.dubois@epfl.ch>
Date: Thu, 29 Aug 2019 14:25:35 +0200
Subject: [PATCH] =?UTF-8?q?R=C3=A9cup=C3=A9ration=20des=20fichiers=20en=20?=
 =?UTF-8?q?prod=20de=20N.=20Crausaz?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../API/app/Http/Controllers/AuthController.php     |  7 +++++++
 canapGEST/API/bootstrap/app.php                     |  3 +--
 canapGEST/API/resources/lang/fr/http.php            | 13 ++++++++-----
 canapGEST/API/web.config                            |  4 ----
 4 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/canapGEST/API/app/Http/Controllers/AuthController.php b/canapGEST/API/app/Http/Controllers/AuthController.php
index 1359e5e..155d50d 100644
--- a/canapGEST/API/app/Http/Controllers/AuthController.php
+++ b/canapGEST/API/app/Http/Controllers/AuthController.php
@@ -35,6 +35,13 @@ class AuthController extends Controller
       'iat' => time(),
       'exp' => time() + 43200
     ];
+
+    // DEV ndubois droits responsable
+    if ($tequila_attributes["uniqueid"] == "167916") {
+      $payload["role"] = 'responsable';
+    }
+
+
     return JWT::encode($payload, env('JWT_SECRET'));
   }
 
diff --git a/canapGEST/API/bootstrap/app.php b/canapGEST/API/bootstrap/app.php
index 9fb6138..f15618f 100644
--- a/canapGEST/API/bootstrap/app.php
+++ b/canapGEST/API/bootstrap/app.php
@@ -1,5 +1,4 @@
 <?php
-
 require_once __DIR__ . '/../vendor/autoload.php';
 
 try {
@@ -23,7 +22,7 @@ $app = new Laravel\Lumen\Application(
     realpath(__DIR__ . '/../')
 );
 
-$app->withFacades(); // pas necessaire ?
+$app->withFacades();
 // $app->withEloquent();
 
 /*
diff --git a/canapGEST/API/resources/lang/fr/http.php b/canapGEST/API/resources/lang/fr/http.php
index 223bec2..efccde9 100644
--- a/canapGEST/API/resources/lang/fr/http.php
+++ b/canapGEST/API/resources/lang/fr/http.php
@@ -26,12 +26,15 @@ return [
       'location' => 'Lieu supprimé',
       'job' => 'Métier supprimé',
       'application' => 'Candidature supprimée'
-    ]
     ],
-    'error' => [
-      'deleted' => [
-        'position' => 'Des candidatures sont liées à cette offre, cette suppression est impossible !'
-      ]
+    'sent' => [
+      'mail' => 'Mail envoyé avec succès'
+    ]
+  ],
+  'error' => [
+    'deleted' => [
+      'position' => 'Des candidatures sont liées à cette offre, cette suppression est impossible !'
     ]
+  ]
 ];
 
diff --git a/canapGEST/API/web.config b/canapGEST/API/web.config
index 3bddc70..c1245b8 100644
--- a/canapGEST/API/web.config
+++ b/canapGEST/API/web.config
@@ -1,10 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
     <system.webServer>
-        <handlers>
-            <remove name="PHP_7.2" />
-            <add name="PHP_7.2" path="*.php" verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="" modules="FastCgiModule" scriptProcessor="C:\Program Files (x86)\PHP\v7.2\php-cgi.exe" resourceType="Either" requireAccess="Script" allowPathInfo="false" preCondition="" responseBufferLimit="4194304" />
-        </handlers>
         <rewrite>
             <rules>
                 <rule name="Silex Front Controller" stopProcessing="true">
-- 
GitLab