Selaa lähdekoodia

Update authentication.php

Empty the permissions before assigning permission to the user during the login process.
FusionPBX 1 vuosi sitten
vanhempi
commit
562bd5e741
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 5 0
      core/authentication/resources/classes/authentication.php

+ 5 - 0
core/authentication/resources/classes/authentication.php

@@ -256,6 +256,11 @@ class authentication {
 					$_SESSION["user"]["username"] = $result["username"];
 					$_SESSION["user"]["username"] = $result["username"];
 					$_SESSION["user"]["contact_uuid"] = $result["contact_uuid"];
 					$_SESSION["user"]["contact_uuid"] = $result["contact_uuid"];
 
 
+				//empty the  permissions
+					if (isset($_SESSION['permissions'])) {
+						unset($_SESSION['permissions']);
+					}
+
 				//get the groups assigned to the user
 				//get the groups assigned to the user
 					$group = new groups($this->database, $result["domain_uuid"], $result["user_uuid"]);
 					$group = new groups($this->database, $result["domain_uuid"], $result["user_uuid"]);
 					$groups = $group->get_groups();
 					$groups = $group->get_groups();