Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
canap
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SI-FSD
canap
Commits
29e3868f
Commit
29e3868f
authored
4 years ago
by
Nicolas Borboën
Browse files
Options
Downloads
Patches
Plain Diff
[feature] config
parent
60929892
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
canapGEST/API/.env.example
+11
-6
11 additions, 6 deletions
canapGEST/API/.env.example
canapGEST/API/app/Http/Controllers/AuthController.php
+7
-4
7 additions, 4 deletions
canapGEST/API/app/Http/Controllers/AuthController.php
with
18 additions
and
10 deletions
canapGEST/API/.env.example
+
11
−
6
View file @
29e3868f
APP_ENV=local
APP_ENV=local
APP_DEBUG=true
APP_DEBUG=true
APP_KEY=
APP_KEY=
CHANGEMEfuef5ahX7ohSh3ieDaiPh3eiy
APP_TIMEZONE=Europe/Zurich
APP_TIMEZONE=Europe/Zurich
# mysql -u canap_db -p canap_db -h localhost --port 9906 --protocol=tcp
DB_CONNECTION=mysql
DB_CONNECTION=mysql
DB_HOST=
127.0.0.1
DB_HOST=
db
DB_PORT=3306
DB_PORT=3306
DB_DATABASE=
homestead
DB_DATABASE=
canap_db
DB_USERNAME=
homestead
DB_USERNAME=
canap_db
DB_PASSWORD=
secret
DB_PASSWORD=
canap_db
CACHE_DRIVER=file
CACHE_DRIVER=file
QUEUE_DRIVER=sync
QUEUE_DRIVER=sync
JWT_SECRET=
JWT_SECRET=CHANGEMEruPigh9cui2eighahd2luu0di
\ No newline at end of file
TEQUILA_REQUIRE_PARAMS='group=canap-gest-users'
TEQUILA_RETURN_URL='https://canap-gest.epfl.ch/#/?key='
BYPASS_RESPONSIBLE_SCIPER=''
This diff is collapsed.
Click to expand it.
canapGEST/API/app/Http/Controllers/AuthController.php
+
7
−
4
View file @
29e3868f
...
@@ -37,8 +37,8 @@ class AuthController extends Controller
...
@@ -37,8 +37,8 @@ class AuthController extends Controller
];
];
// DEV ndubois droits responsable
// DEV ndubois droits responsable
if
(
$tequila_attributes
[
"uniqueid"
]
==
"16
7916
"
)
{
if
(
$tequila_attributes
[
"uniqueid"
]
==
"16
9419
"
)
{
//
$payload["role"] = 'responsable';
$payload
[
"role"
]
=
'responsable'
;
}
}
...
@@ -60,7 +60,8 @@ class AuthController extends Controller
...
@@ -60,7 +60,8 @@ class AuthController extends Controller
$oClient
->
setRequested
(
$oClient
->
setRequested
(
array
(
array
(
'request'
=>
"name,firstname,uniqueid,group"
,
'request'
=>
"name,firstname,uniqueid,group"
,
'require'
=>
"group=canap-gest-users"
//'require' => "group=canap-gest-users"
'require'
=>
env
(
'DB_USERNAME'
,
'group=canap-gest-users'
)
)
)
);
);
...
@@ -82,7 +83,9 @@ class AuthController extends Controller
...
@@ -82,7 +83,9 @@ class AuthController extends Controller
public
function
tequilareturn
()
public
function
tequilareturn
()
{
{
// return redirect()->to("https://canap-gest-dev.local:8080/#/?key=" . $_GET["key"]);
// return redirect()->to("https://canap-gest-dev.local:8080/#/?key=" . $_GET["key"]);
return
redirect
()
->
to
(
"https://canap-gest.epfl.ch/#/?key="
.
$_GET
[
"key"
]);
// PROD
// return redirect()->to("https://canap-gest.epfl.ch/#/?key=" . $_GET["key"]); // PROD
// return redirect()->to("http://localhost:8080/#/?key=" . $_GET["key"]); // DEV
return
redirect
()
->
to
(
env
(
'DB_USERNAME'
,
'group=canap-gest-users'
)
.
$_GET
[
"key"
]);
// DEV
}
}
public
function
logout
()
public
function
logout
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment