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

Commit 61a7873

Browse files
Fix List of SPs (#130)
* 'listOfSps.perunProxyIdentifierAttr' should be internal name
1 parent 9f46aa4 commit 61a7873

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/ListOfSps.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class ListOfSps
55
{
66
public static function sortByName($a, $b)
77
{
8-
return strcmp(strtolower($a['facility']->getName()), strtolower($b['facility']->getName()));
8+
return strcmp(strtolower($a['name']['value']), strtolower($b['name']['value']));
99
}
1010

1111
public static function getClass($type)

www/listOfSps.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
use SimpleSAML\Module\perun\AdapterRpc;
44
use SimpleSAML\Configuration;
5+
use SimpleSAML\Module\perun\AttributeUtils;
56
use SimpleSAML\XHTML\Template;
67
use SimpleSAML\Error\Exception;
7-
use SimpleSAML\Module\perun\ListOfSps;
88

99
const CONFIG_FILE_NAME = 'module_perun.php';
1010
const PROXY_IDENTIFIER = 'listOfSps.proxyIdentifier';
@@ -31,7 +31,10 @@
3131
);
3232
}
3333

34-
$perunProxyIdentifierAttr = $conf->getString(PERUN_PROXY_IDENTIFIER_ATTR_NAME);
34+
$perunProxyIdentifierAttr = AttributeUtils::getAttrName(
35+
$conf->getString(PERUN_PROXY_IDENTIFIER_ATTR_NAME),
36+
AdapterRpc::RPC
37+
);
3538
if (empty($perunProxyIdentifierAttr)) {
3639
throw new Exception(
3740
'perun:listOfSps: missing mandatory config option \''

0 commit comments

Comments
 (0)