Revision: 3158
Author: olavmrk
Date: Thu Aug 30 04:39:38 2012
Log: consent: New option: showNoConsentAboutService
Since the "about service"-link takes the user away from the IdP, the
user will still have an session on the IdP. This option allows us to
disable that link.
http://code.google.com/p/simplesamlphp/source/detail?r=3158
Modified:
/trunk/modules/consent/docs/consent.txt
/trunk/modules/consent/lib/Auth/Process/Consent.php
/trunk/modules/consent/www/noconsent.php
=======================================
--- /trunk/modules/consent/docs/consent.txt Tue Mar 13 02:40:25 2012
+++ /trunk/modules/consent/docs/consent.txt Thu Aug 30 04:39:38 2012
@@ -160,6 +160,9 @@
the attributes that should have it value hidden. Default behaviour is
that
all attribute values are shown
+`showNoConsentAboutService`
+: Whether we will show a link to more information about the service from
the
+ no consent page. Defaults to `TRUE`.
External options
----------------
=======================================
--- /trunk/modules/consent/lib/Auth/Process/Consent.php Wed Mar 21 05:28:53
2012
+++ /trunk/modules/consent/lib/Auth/Process/Consent.php Thu Aug 30 04:39:38
2012
@@ -52,6 +52,13 @@
*/
private $_noconsentattributes = array();
+ /**
+ * Whether we should show the "about service"-link on the no consent
page.
+ *
+ * @var bool
+ */
+ private $_showNoConsentAboutService = true;
+
/**
* Initialize consent filter
*
@@ -125,6 +132,14 @@
);
}
}
+
+ if (array_key_exists('showNoConsentAboutService', $config)) {
+ if (!is_bool($config['showNoConsentAboutService'])) {
+ throw new SimpleSAML_Error_Exception('Consent:
showNoConsentAboutService must be a boolean.');
+ }
+ $this->_showNoConsentAboutService =
$config['showNoConsentAboutService'];
+ }
+
}
/**
@@ -250,6 +265,7 @@
$state['consent:checked'] = $this->_checked;
$state['consent:hiddenAttributes'] = $this->_hiddenAttributes;
$state['consent:noconsentattributes'] =
$this->_noconsentattributes;
+ $state['consent:showNoConsentAboutService'] =
$this->_showNoConsentAboutService;
// User interaction nessesary. Throw exception on isPassive request
if (isset($state['isPassive']) && $state['isPassive'] == true) {
=======================================
--- /trunk/modules/consent/www/noconsent.php Thu Aug 30 04:39:17 2012
+++ /trunk/modules/consent/www/noconsent.php Thu Aug 30 04:39:38 2012
@@ -26,8 +26,10 @@
$aboutService = null;
-if (isset($state['Destination']['url.about'])) {
- $aboutService = $state['Destination']['url.about'];
+if (!isset($state['consent:showNoConsentAboutService']) ||
$state['consent:showNoConsentAboutService']) {
+ if (isset($state['Destination']['url.about'])) {
+ $aboutService = $state['Destination']['url.about'];
+ }
}
$statsInfo = array();
--
You received this message because you are subscribed to the Google Groups
"simpleSAMLphp commits" group.
To post to this group, send email to simplesamlphp-commits@googlegroups.com.
To unsubscribe from this group, send email to
simplesamlphp-commits+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/simplesamlphp-commits?hl=en.