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

View File

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