diff --git a/tmpl/lmConf-1.json b/tmpl/lmConf-1.json index 39e2589..6b5081c 100644 --- a/tmpl/lmConf-1.json +++ b/tmpl/lmConf-1.json @@ -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",