diff --git a/build/api/core/AuthSystemDefault.php b/build/api/core/AuthSystemDefault.php
index 1a2ceac..59d73a1 100644
--- a/build/api/core/AuthSystemDefault.php
+++ b/build/api/core/AuthSystemDefault.php
@@ -23,8 +23,9 @@
/* (1) Init session variables
---------------------------------------------------------*/
- if( !isset($_SESSION['CAS']) || !is_array($_SESSION['CAS']) ) $_SESSION['CAS'] = [];
- if( !isset($_SESSION['AUTH']) || !is_array($_SESSION['AUTH']) ) $_SESSION['AUTH'] = [];
+ if( !isset($_SESSION['CAS']) || !is_array($_SESSION['CAS']) ) $_SESSION['CAS'] = [];
+ if( !isset($_SESSION['AUTH']) || !is_array($_SESSION['AUTH']) ) $_SESSION['AUTH'] = [];
+ if( !isset($_SESSION['AvailableDepartment']) || !is_array($_SESSION['AvailableDepartment']) ) $_SESSION['AvailableDepartment'] = [];
/* (2) Check CAS
@@ -38,8 +39,8 @@
/* (2) Get professor with this login */
$deps = $prof_repo->getLinkedDepartment($_SESSION['CAS']['login']);
if(is_array($deps)){
- $_SESSION["AvailableDepartment"] = $deps;
- $_SESSION['CurrentDatabase'] = $deps[0]["dbName"];
+ $_SESSION["AvailableDepartment"] = $deps;
+ $_SESSION['CurrentDatabase'] = $deps[0]["dbName"];
$_SESSION['CurrentDepartementId'] = $deps[0]["idDep"];
Repo::switchDatabase($_SESSION['CurrentDatabase']);
diff --git a/build/api/module/casController.php b/build/api/module/casController.php
index e38038e..9b1b281 100644
--- a/build/api/module/casController.php
+++ b/build/api/module/casController.php
@@ -122,14 +122,10 @@ class casController{
public function delete(){
- /* (1) Remove CAS credentials */
- $_SESSION['CAS'] = [];
-
- /* (2) Re-process AuthSystemDefault */
- new \api\core\AuthSystemDefault();
+ \session_destroy();
/* (3) Return if logged out */
- return ['logged_out' => !in_array('cas_user', $_SESSION['AUTH'])];
+ return ['logged_out' => true];
}
diff --git a/build/router/controller/js.php b/build/router/controller/js.php
index 68f7678..71c3c4e 100644
--- a/build/router/controller/js.php
+++ b/build/router/controller/js.php
@@ -28,8 +28,10 @@
echo "window._SERVER = ".json_encode([
'session' => [
- 'name' => $_SESSION['NAME'],
- 'connected' => isset($_SESSION['AUTH']) ? count($_SESSION['AUTH']) > 0 : false
+ 'name' => $_SESSION['CAS']['login'],
+ '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";
diff --git a/webpack/component/ue/manage.vue b/webpack/component/ue/manage.vue
index b9914bb..4d0f2a9 100644
--- a/webpack/component/ue/manage.vue
+++ b/webpack/component/ue/manage.vue
@@ -7,14 +7,14 @@
-
-
+
section.filter{
- padding-bottom: 0;
+ // padding-bottom: 0;
background-color: transparent;