Skip to content
Snippets Groups Projects
Commit ef3334c5 authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

automatic scalar to list promotion allows to process all attributes consistently

parent 5653a054
No related branches found
No related tags found
No related merge requests found
......@@ -9,11 +9,7 @@ $validTestAccounts = array (
'[% account.internal_uid() %]:{SHA256}[% account.password_hash() %]=' => array(
'internal_uid' => array([% account.internal_uid().quote %]),
'associatedSP' => array([% account.entityid().quote %]),
[% FOREACH attribute IN [ 'cn', 'displayName', 'givenName', 'sn', 'mail', 'schacHomeOrganization', 'schacHomeOrganizationType', 'eduPersonPrincipalName' ] %]
[% NEXT UNLESS attributes.$attribute %]
'[% attribute %]' => array([% attributes.$attribute.quote("'") %]),
[% END %]
[% FOREACH attribute IN [ 'eduPersonAffiliation', 'eduPersonScopedAffiliation' ] %]
[% FOREACH attribute IN [ 'cn', 'displayName', 'givenName', 'sn', 'mail', 'schacHomeOrganization', 'schacHomeOrganizationType', 'eduPersonPrincipalName', 'eduPersonAffiliation', 'eduPersonScopedAffiliation' ] %]
[% NEXT UNLESS attributes.$attribute %]
'[% attribute %]' => array([% attributes.$attribute.quote("'").join(', ') %]),
[% END %]
......
......@@ -56,12 +56,7 @@
<div>
<table>
<caption>[% lh.maketext("List of user attributes") %]</caption>
[% FOREACH attribute IN [ 'cn', 'displayName', 'givenName', 'sn', 'mail', 'schacHomeOrganization', 'schacHomeOrganizationType', 'eduPersonPrincipalName' ] %]
<tr>
<th>[% attribute %]</th><td>[% attributes.$attribute %]</td>
</tr>
[% END %]
[% FOREACH attribute IN [ 'eduPersonAffiliation', 'eduPersonScopedAffiliation' ] %]
[% FOREACH attribute IN [ 'cn', 'displayName', 'givenName', 'sn', 'mail', 'schacHomeOrganization', 'schacHomeOrganizationType', 'eduPersonPrincipalName', 'eduPersonAffiliation', 'eduPersonScopedAffiliation' ] %]
<tr>
<th>[% attribute %]</th><td>[% attributes.$attribute.join(', ') %]</td>
</tr>
......
......@@ -58,12 +58,7 @@
<div>
<table>
<caption>[% lh.maketext("List of user attributes") %]</caption>
[% FOREACH attribute IN [ 'cn', 'displayName', 'givenName', 'sn', 'mail', 'schacHomeOrganization', 'schacHomeOrganizationType', 'eduPersonPrincipalName' ] %]
<tr>
<th>[% attribute %]</th><td>[% attributes.$attribute %]</td>
</tr>
[% END %]
[% FOREACH attribute IN [ 'eduPersonAffiliation', 'eduPersonScopedAffiliation' ] %]
[% FOREACH attribute IN [ 'cn', 'displayName', 'givenName', 'sn', 'mail', 'schacHomeOrganization', 'schacHomeOrganizationType', 'eduPersonPrincipalName', 'eduPersonAffiliation', 'eduPersonScopedAffiliation' ] %]
<tr>
<th>[% attribute %]</th><td>[% attributes.$attribute.join(', ') %]</td>
</tr>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment