diff --git a/canapGEST/API/app/Http/Controllers/AuthController.php b/canapGEST/API/app/Http/Controllers/AuthController.php index 1359e5e8fa75e8547ac8021dbea52039f6739f5e..155d50d4bc3d200be3dfbf5a0654b8e8d4578c59 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 9fb6138434fe389fe8e55b0a2cdb3068bb5752d9..f15618fb8e6de4a2f1dd727edcd49206f6eb27b3 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 223bec2b24d0495f3dc73d3f619db491e8ca1f7d..efccde91032773d4cb1139102fc3c25daf9f78e4 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 3bddc70ccd4a4724af8303280e0c88324f116ddd..c1245b87f30337d64a1f7f3440290dcbfeaead23 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">