This repository was archived by the owner on Sep 19, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +17
-9
lines changed
Expand file tree Collapse file tree 2 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 110110 <thead>
111111 <tr>
112112 <th><?php echo $ this ->t ('{perun:listOfSps:name} ' ); ?> </th>
113- <th><?php echo $ this ->t ('{perun:listOfSps:authenticate_protocol} ' ); ?> </th>
114113 <?php
114+ if ($ this ->data ['showProtocol ' ]) {
115+ echo '<th> ' . $ this ->t ('{perun:listOfSps:authenticate_protocol} ' ) . '</th> ' . PHP_EOL ;
116+ }
115117 foreach ($ attributesToShow as $ attr ) {
116118 if (!empty ($ samlServices )) {
117- echo " <th class=' " . ListOfSps:: getClass (
118- array_values ( $ samlServices)[ 0 ][ ' facilityAttributes ' ][ $ attr ][ ' type ' ]
119- ) . " '> " . array_values ( $ samlServices ) [0 ]['facilityAttributes ' ][$ attr ]['displayName ' ]
120- . '</th> ' ;
119+ $ displayName = array_values (
120+ $ samlServices
121+ )[0 ]['facilityAttributes ' ][$ attr ]['displayName ' ];
122+ echo ' <th> ' . $ displayName . '</th> ' ;
121123 }
122124 }
123125 ?>
138140 $ service ['loginURL ' ]['value ' ] ?? null
139141 )
140142 . '</td> ' ;
141- if (array_key_exists ($ service ['facility ' ]->getID (), $ samlServices )) {
142- echo '<td> ' . $ this ->t ('{perun:listOfSps:saml} ' ) . '</td> ' ;
143- } else {
144- echo '<td> ' . $ this ->t ('{perun:listOfSps:oidc} ' ) . '</td> ' ;
143+ if ($ this ->data ['showProtocol ' ]) {
144+ if (array_key_exists ($ service ['facility ' ]->getID (), $ samlServices )) {
145+ echo '<td> ' . $ this ->t ('{perun:listOfSps:saml} ' ) . '</td> ' ;
146+ } else {
147+ echo '<td> ' . $ this ->t ('{perun:listOfSps:oidc} ' ) . '</td> ' ;
148+ }
145149 }
146150 foreach ($ attributesToShow as $ attr ) {
147151 $ type = $ service ['facilityAttributes ' ][$ attr ]['type ' ];
Original file line number Diff line number Diff line change 1919const PERUN_LOGIN_URL_ATTR_NAME = 'listOfSps.loginURLAttr ' ;
2020const PERUN_TEST_SP_ATTR_NAME = 'listOfSps.isTestSpAttr ' ;
2121const PERUN_SHOW_ON_SERVICE_LIST_ATTR_NAME = 'listOfSps.showOnServiceListAttr ' ;
22+ const PERUN_SHOW_PROTOCOL = 'listOfSps.showProtocol ' ;
2223const PERUN_SAML2_ENTITY_ID_ATTR_NAME = 'listOfSps.SAML2EntityIdAttr ' ;
2324const PERUN_OIDC_CLIENT_ID_ATTR_NAME = 'listOfSps.OIDCClientIdAttr ' ;
2425
7273$ perunShowOnServiceListAttr
7374 = $ conf ->getString (PERUN_SHOW_ON_SERVICE_LIST_ATTR_NAME , null );
7475
76+ $ showProtocol = $ conf ->getBoolean (PERUN_SHOW_PROTOCOL , true );
77+
7578$ rpcAdapter = new AdapterRpc ();
7679$ attributeDefinition = [];
7780$ attributeDefinition [$ perunProxyIdentifierAttr ] = $ proxyIdentifier ;
192195 $ t ->data ['statistics ' ] = $ statistics ;
193196 $ t ->data ['attributesToShow ' ] = $ attributesToShow ;
194197 $ t ->data ['multilingualAttributes ' ] = $ multilingualAttributes ;
198+ $ t ->data ['showProtocol ' ] = $ showProtocol ;
195199 $ t ->data ['isNameMultilingual ' ] = in_array ($ perunServiceNameAttr , $ multilingualAttributes , true );
196200 $ t ->data ['samlServices ' ] = $ samlServices ;
197201 $ t ->data ['oidcServices ' ] = $ oidcServices ;
You can’t perform that action at this time.
0 commit comments