Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit 05f0824

Browse files
melangervyskocilpavel
authored andcommitted
Update listOfSps-tpl.php
1 parent 2da55b9 commit 05f0824

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ All notable changes to this project will be documented in this file.
1111
- Changed the way of getting attribute names for interfaces: through internal attribute names in perun_attributes.php config
1212
- Return sorted eduPersonEntitlement
1313
- Don't show previous selection when user show all entries on the discovery page
14-
- ListOfSps - Don't show the description by default
14+
- ListOfSps
15+
- Don't show the description by default
16+
- Added required attribute 'listOfSps.serviceNameAttr' !!!
1517

1618
## [v3.9.0]
1719
#### Added

config-templates/module_perun.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,8 @@
147147

148148
/**
149149
* Specify attribute name for facility attribute with service name
150-
* Defaults to facility name (urn:perun:facility:attribute-def:core:name)
151150
*/
152-
//'listOfSps.serviceNameAttr' => '',
151+
'listOfSps.serviceNameAttr' => '',
153152

154153
/**
155154
* Specify attribute name for facility attribute with loginUrL for service

templates/listOfSps-tpl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
}
117117
echo '<tr>';
118118
echo '<td>'
119-
. ListOfSps::printServiceName($service['name'], $service['loginURL'] ?? null)
119+
. ListOfSps::printServiceName($service['name']['value'], $service['loginURL']['value'] ?? null)
120120
. '</td>';
121121
if (array_key_exists($service['facility']->getID(), $samlServices)) {
122122
echo '<td>' . $this->t('{perun:listOfSps:saml}') . '</td>';

www/listOfSps.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,13 @@
6363
);
6464
}
6565

66-
$perunServiceNameAttr = $conf->getString(PERUN_SERVICE_NAME_ATTR_NAME, 'urn:perun:facility:attribute-def:core:name');
66+
$perunServiceNameAttr = $conf->getString(PERUN_SERVICE_NAME_ATTR_NAME, null);
67+
if (empty($perunServiceNameAttr)) {
68+
throw new Exception(
69+
'perun:listOfSps: missing mandatory config option \''
70+
. PERUN_SERVICE_NAME_ATTR_NAME . '\'.'
71+
);
72+
}
6773
$perunLoginURLAttr = $conf->getString(PERUN_LOGIN_URL_ATTR_NAME, null);
6874
$perunTestSpAttr = $conf->getString(PERUN_TEST_SP_ATTR_NAME, null);
6975
$perunShowOnServiceListAttr

0 commit comments

Comments
 (0)