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

attributes handling simplification

parent 74544bfe
No related branches found
No related tags found
No related merge requests found
package AccountManager::Account;
use utf8;
use strict;
use warnings;
......@@ -153,14 +154,18 @@ sub mail {
sub eduPersonAffiliation {
my ($self) = @_;
return $affiliation{$self->profile()};
my $affiliations = $affiliation{$self->profile()} || [];
return join(', ', @$affiliations);
}
sub eduPersonScopedAffiliation {
my ($self) = @_;
my $affiliations = $scopedAffiliation{$self->profile()};
return $affiliations ?
[ map { $_ . '@' . $self->{scope} } @$affiliations ] : undef;
my $affiliations = $scopedAffiliation{$self->profile()} || [];
$affiliations = [ map { $_ . '@' . $self->{scope} } @$affiliations ];
return join(', ', @$affiliations);
}
sub eduPersonPrincipalName {
......
......@@ -37,15 +37,10 @@
<div>
<table>
<caption>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> [% account.$attribute %]</td>
</tr>
[% END %]
[% FOREACH attribute IN [ 'eduPersonAffiliation', 'eduPersonScopedAffiliation' ] -%]
<tr>
<th>[% attribute %]</th><td> [% account.$attribute.join(', ') %]</td>
</tr>
[% END %]
<tr>
<th>eduPersonTargetedID:</th><td><i>value dynamically generated by the SP</i></td>
......@@ -60,7 +55,7 @@
[% END %]
</div>
<p><strong>Please keep a record of the above user names and passwords</strong> because currently there is no mecanism to retrieve the above credentials once you close this page. If you forget the username and passwords, you can however request new test accounts.</p>
<p>Click <a href="[% conf.app_url %]?action=download_accounts&entityid=[% sp_entityid %]&token=[% token %]&key=[% key %]">here</a> to download the details of those accounts in CSV format.</p>
<div class="alert-box warning radius">
<p>Note that these test accounts will automatically expire in [% conf.accounts_validity_period %] days and that they can only be used to test federated login to your eduGAIN-enabled Service Provider with entityID <strong>[% sp_entityid %]</strong>.</p>
......
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