Added regex to LDAP advanced permissions

This commit is contained in:
Kike 2018-06-23 14:24:32 +02:00
parent b467eea16b
commit 7ed5077c01
1 changed files with 1 additions and 1 deletions

View File

@ -349,7 +349,7 @@ function process_user_login_remote ($login, $pass, $api = false) {
foreach ($attributes as $attr) { foreach ($attributes as $attr) {
$attr = explode('=', $attr, 2); $attr = explode('=', $attr, 2);
if(in_array($attr[1],$sr[$attr[0]])) { if(preg_match('/' . $attr[1] . '/', $sr[$attr[0]][0])){
$permissions[$i]["profile"] = $ldap_adv_perm['profile']; $permissions[$i]["profile"] = $ldap_adv_perm['profile'];
$permissions[$i]["groups"] = $ldap_adv_perm['group']; $permissions[$i]["groups"] = $ldap_adv_perm['group'];
$permissions[$i]["tags"] = implode(",",$ldap_adv_perm['tags']); $permissions[$i]["tags"] = implode(",",$ldap_adv_perm['tags']);