From d9339969e5f3a7b81872284747d8546f94f1ce32 Mon Sep 17 00:00:00 2001 From: Joly0 Date: Tue, 23 Jun 2020 15:27:55 +0200 Subject: [PATCH 1/5] Update LdapSync.php --- app/Console/Commands/LdapSync.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.php index a7941050f820..74c1eff87aa3 100755 --- a/app/Console/Commands/LdapSync.php +++ b/app/Console/Commands/LdapSync.php @@ -7,6 +7,9 @@ use App\Models\Ldap; use App\Models\User; use App\Models\Location; +use App\Helpers\Helber; +use Config; +use Input; use Log; class LdapSync extends Command @@ -51,7 +54,10 @@ public function handle() $ldap_result_active_flag = Setting::getSettings()->ldap_active_flag_field; $ldap_result_emp_num = Setting::getSettings()->ldap_emp_num; $ldap_result_email = Setting::getSettings()->ldap_email; - + + $permissions = config('permissions'); + $permissions_array = Helper::selectedPermissionsArray($permissions, Input::old('permissions', array())); + try { $ldapconn = Ldap::connectToLdap(); Ldap::bindAdminToLdap($ldapconn); @@ -177,6 +183,7 @@ public function handle() $user->password = $pass; $user->activated = 0; $item["createorupdate"] = 'created'; + $user->permissions = json_encode($permissions_array); } $user->first_name = $item["firstname"]; From c4a80bd9b95ced9f9abbabc858c7f94e19fc0e35 Mon Sep 17 00:00:00 2001 From: Joly0 Date: Tue, 23 Jun 2020 15:28:51 +0200 Subject: [PATCH 2/5] Update LdapSync.php --- app/Console/Commands/LdapSync.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.php index 74c1eff87aa3..10194eb4918e 100755 --- a/app/Console/Commands/LdapSync.php +++ b/app/Console/Commands/LdapSync.php @@ -7,7 +7,7 @@ use App\Models\Ldap; use App\Models\User; use App\Models\Location; -use App\Helpers\Helber; +use App\Helpers\Helper; use Config; use Input; use Log; From 89a173a82078f00b348f6dfee5b2e0376f4cd1f9 Mon Sep 17 00:00:00 2001 From: Joly0 Date: Tue, 14 Jul 2020 08:41:43 +0200 Subject: [PATCH 3/5] Update LdapSync.php --- app/Console/Commands/LdapSync.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.php index 10194eb4918e..d7b3b267f957 100755 --- a/app/Console/Commands/LdapSync.php +++ b/app/Console/Commands/LdapSync.php @@ -56,7 +56,7 @@ public function handle() $ldap_result_email = Setting::getSettings()->ldap_email; $permissions = config('permissions'); - $permissions_array = Helper::selectedPermissionsArray($permissions, Input::old('permissions', array())); + $permissions_array = Helper::selectedPermissionsArray($permissions); try { $ldapconn = Ldap::connectToLdap(); From 18386b1e3e71978ed027ea34cf5206079a78588f Mon Sep 17 00:00:00 2001 From: Joly0 Date: Tue, 14 Jul 2020 08:46:25 +0200 Subject: [PATCH 4/5] Update LdapSync.php --- app/Console/Commands/LdapSync.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.php index d7b3b267f957..bf108a11691a 100755 --- a/app/Console/Commands/LdapSync.php +++ b/app/Console/Commands/LdapSync.php @@ -9,7 +9,6 @@ use App\Models\Location; use App\Helpers\Helper; use Config; -use Input; use Log; class LdapSync extends Command From fb8f0991ecfd3330bd5787a2f7ef4e6bfb6c7c94 Mon Sep 17 00:00:00 2001 From: Joly0 Date: Tue, 14 Jul 2020 08:46:50 +0200 Subject: [PATCH 5/5] Update LdapSync.php --- app/Console/Commands/LdapSync.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.php index bf108a11691a..47404c2d080b 100755 --- a/app/Console/Commands/LdapSync.php +++ b/app/Console/Commands/LdapSync.php @@ -55,7 +55,7 @@ public function handle() $ldap_result_email = Setting::getSettings()->ldap_email; $permissions = config('permissions'); - $permissions_array = Helper::selectedPermissionsArray($permissions); + $permissions_array = Helper::selectedPermissionsArray($permissions); try { $ldapconn = Ldap::connectToLdap();