From 85a059761467c615a7caa8570f0bf1464bf9b395 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no>
Date: Tue, 13 Oct 2009 06:45:33 +0000
Subject: [PATCH] List Remote IdPs regardless of the SP enable settings. Works
 better with new SP module

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1845 44740490-163a-0410-bde0-09ae8108e29a
---
 modules/core/www/frontpage_federation.php | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/modules/core/www/frontpage_federation.php b/modules/core/www/frontpage_federation.php
index 9b91f3285..e46d2e369 100644
--- a/modules/core/www/frontpage_federation.php
+++ b/modules/core/www/frontpage_federation.php
@@ -93,13 +93,18 @@ SimpleSAML_Module::callHooks('metadata_hosted', $metadataHosted);
 $metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
 
 $metaentries = array('hosted' => $metadataHosted, 'remote' => array() );
+
+
+if ($isadmin) {
+	$metaentries['remote']['saml20-idp-remote'] = $metadata->getList('saml20-idp-remote');
+	$metaentries['remote']['shib13-idp-remote'] = $metadata->getList('shib13-idp-remote');
+}
+
 if ($config->getBoolean('enable.saml20-sp', TRUE) === true) {
 	try {
 		$metaentries['hosted']['saml20-sp'] = $metadata->getMetaDataCurrent('saml20-sp-hosted');
 		$metaentries['hosted']['saml20-sp']['deprecated'] = TRUE;
 		$metaentries['hosted']['saml20-sp']['metadata-url'] = '/' . $config->getBaseURL() . 'saml2/sp/metadata.php?output=xhtml';
-		if ($isadmin)
-			$metaentries['remote']['saml20-idp-remote'] = $metadata->getList('saml20-idp-remote');
 	} catch(Exception $e) {}
 }
 if ($config->getBoolean('enable.saml20-idp', FALSE) === true) {
@@ -115,8 +120,6 @@ if ($config->getBoolean('enable.shib13-sp', FALSE) === true) {
 		$metaentries['hosted']['shib13-sp'] = $metadata->getMetaDataCurrent('shib13-sp-hosted');
 		$metaentries['hosted']['shib13-sp']['deprecated'] = TRUE;
 		$metaentries['hosted']['shib13-sp']['metadata-url'] = '/' . $config->getBaseURL() . 'shib13/sp/metadata.php?output=xhtml';
-		if ($isadmin)
-			$metaentries['remote']['shib13-idp-remote'] = $metadata->getList('shib13-idp-remote');
 	} catch(Exception $e) {}
 }
 if ($config->getBoolean('enable.shib13-idp', FALSE) === true) {
-- 
GitLab