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

no need to hardcode attributes list

parent 26ecbb01
No related branches found
No related tags found
No related merge requests found
......@@ -9,9 +9,8 @@ $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', 'eduPersonAffiliation', 'eduPersonScopedAffiliation' ] %]
[% NEXT UNLESS attributes.$attribute %]
'[% attribute %]' => array([% attributes.$attribute.quote("'").join(', ') %]),
[% FOREACH pair IN attributes.pairs %]
'[% pair.key %]' => array([% pair.value.quote("'").join(', ') %]),
[% END %]
),
......
......@@ -58,9 +58,9 @@
<div>
<table>
<caption>[% lh.maketext("List of user attributes") %]</caption>
[% FOREACH attribute IN [ 'cn', 'displayName', 'givenName', 'sn', 'mail', 'schacHomeOrganization', 'schacHomeOrganizationType', 'eduPersonPrincipalName', 'eduPersonAffiliation', 'eduPersonScopedAffiliation' ] %]
[% FOREACH pair IN attributes.pairs %]
<tr>
<th>[% attribute %]</th><td>[% attributes.$attribute.join(', ') %]</td>
<th>[% pair.key %]</th><td>[% pair.value.join(', ') %]</td>
</tr>
[% END %]
<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