[bowdel] + [AuthSystemDefault] + [module.cas] DELETE (now logout works + login + session departE?E?E?E?E?ment data)
This commit is contained in:
parent
a5f68b2021
commit
688b0c10c8
|
@ -25,6 +25,7 @@
|
||||||
---------------------------------------------------------*/
|
---------------------------------------------------------*/
|
||||||
if( !isset($_SESSION['CAS']) || !is_array($_SESSION['CAS']) ) $_SESSION['CAS'] = [];
|
if( !isset($_SESSION['CAS']) || !is_array($_SESSION['CAS']) ) $_SESSION['CAS'] = [];
|
||||||
if( !isset($_SESSION['AUTH']) || !is_array($_SESSION['AUTH']) ) $_SESSION['AUTH'] = [];
|
if( !isset($_SESSION['AUTH']) || !is_array($_SESSION['AUTH']) ) $_SESSION['AUTH'] = [];
|
||||||
|
if( !isset($_SESSION['AvailableDepartment']) || !is_array($_SESSION['AvailableDepartment']) ) $_SESSION['AvailableDepartment'] = [];
|
||||||
|
|
||||||
|
|
||||||
/* (2) Check CAS
|
/* (2) Check CAS
|
||||||
|
|
|
@ -122,14 +122,10 @@ class casController{
|
||||||
|
|
||||||
public function delete(){
|
public function delete(){
|
||||||
|
|
||||||
/* (1) Remove CAS credentials */
|
\session_destroy();
|
||||||
$_SESSION['CAS'] = [];
|
|
||||||
|
|
||||||
/* (2) Re-process AuthSystemDefault */
|
|
||||||
new \api\core\AuthSystemDefault();
|
|
||||||
|
|
||||||
/* (3) Return if logged out */
|
/* (3) Return if logged out */
|
||||||
return ['logged_out' => !in_array('cas_user', $_SESSION['AUTH'])];
|
return ['logged_out' => true];
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,8 +28,10 @@
|
||||||
echo "window._SERVER = ".json_encode([
|
echo "window._SERVER = ".json_encode([
|
||||||
|
|
||||||
'session' => [
|
'session' => [
|
||||||
'name' => $_SESSION['NAME'],
|
'name' => $_SESSION['CAS']['login'],
|
||||||
'connected' => isset($_SESSION['AUTH']) ? count($_SESSION['AUTH']) > 0 : false
|
'connected' => isset($_SESSION['AUTH']) ? count($_SESSION['AUTH']) > 0 : false,
|
||||||
|
'departments' => array_map(function($d){ return [ 'id' => $d['idDep'], 'label' => $d['labelDep']]; }, $_SESSION['AvailableDepartment']),
|
||||||
|
'department_id' => $_SESSION['CurrentDepartementId']
|
||||||
]
|
]
|
||||||
|
|
||||||
])."\n";
|
])."\n";
|
||||||
|
|
|
@ -7,14 +7,14 @@
|
||||||
<!-- <button @click='gstore.nav_out($router)'>Retour</button> -->
|
<!-- <button @click='gstore.nav_out($router)'>Retour</button> -->
|
||||||
|
|
||||||
<!-- FILTERS -->
|
<!-- FILTERS -->
|
||||||
<!-- <section class='filter'>
|
<section class='filter'>
|
||||||
|
|
||||||
|
<div>Type</div>
|
||||||
<div>enseignant</div>
|
<div>enseignant</div>
|
||||||
<div>volume horaire</div>
|
<div>volume horaire</div>
|
||||||
<div>formations</div>
|
<div>formations</div>
|
||||||
|
|
||||||
</section> -->
|
</section>
|
||||||
<section class='filter'></section>
|
|
||||||
|
|
||||||
<!-- COURS -->
|
<!-- COURS -->
|
||||||
<section
|
<section
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
|
|
||||||
/* (2) Filter */
|
/* (2) Filter */
|
||||||
& > section.filter{
|
& > section.filter{
|
||||||
padding-bottom: 0;
|
// padding-bottom: 0;
|
||||||
|
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue