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