Fix LDAP/CAS/Exported attributes bug

This commit is contained in:
Philippe Caseiro 2021-02-03 15:44:14 +01:00
parent 6c5beb7e9f
commit adea10270d
1 changed files with 5 additions and 5 deletions

View File

@ -2,9 +2,11 @@
%set %%ssoFilters = %%getSSOFilters %set %%ssoFilters = %%getSSOFilters
%set %%exported_vars = ['"UA": "HTTP_USER_AGENT"'] %set %%exported_vars = ['"UA": "HTTP_USER_AGENT"']
%set %%cas_attributes = [] %set %%cas_attributes = []
%set %%ldap_attributes = ['"uid": "uid"', '"mail": "mail"','"cn":"cn"']
%for %%attr in %%casAttribute %for %%attr in %%casAttribute
%silent %%exported_vars.append('"' + %%attr + '": "' + %%attr + '.casLDAPAttribute"') %silent %%exported_vars.append('"' + %%attr + '": "' + %%attr.casLDAPAttribute + '"')
%silent %%cas_attributes.append('"' + %%attr + '": "' + %%attr + '.casLDAPAttribute"') %silent %%cas_attributes.append('"' + %%attr + '": "' + %%attr.casLDAPAttribute + '"')
%silent %%ldap_attributes.append('"' + %%attr + '": "' + %%attr.casLDAPAttribute + '"')
%end for %end for
%for %%key, %%value in %%ssoFilters %for %%key, %%value in %%ssoFilters
%silent %%exported_vars.append('"' + %%key + '": "' + %%value + '"') %silent %%exported_vars.append('"' + %%key + '": "' + %%value + '"')
@ -173,9 +175,7 @@
"ldapSearchDeref": "find", "ldapSearchDeref": "find",
"ldapBase": "%%ldapUserBaseDN", "ldapBase": "%%ldapUserBaseDN",
"ldapExportedVars": { "ldapExportedVars": {
"cn": "cn", %%custom_join(%%ldap_attributes, ',\n ')
"mail": "mail",
"uid": "uid"
}, },
"ldapGroupAttributeName": "memberUid", "ldapGroupAttributeName": "memberUid",
"ldapGroupAttributeNameGroup": "dn", "ldapGroupAttributeNameGroup": "dn",