summaryrefslogtreecommitdiffstats
path: root/idp/extra/modules/saml2.py
diff options
context:
space:
mode:
authorFrederic Peters <fpeters@0d.be>2009-04-14 16:44:50 (GMT)
committerFrederic Peters <fpeters@0d.be>2009-04-14 16:44:50 (GMT)
commitabe4094c23250f9c7ea76b680c87d7b9a4e0265a (patch)
tree4df8690373f776c3a7c3780a386c21b5ef72359b /idp/extra/modules/saml2.py
parentb83566a8398a847de3e67c6dcc5149abe7a717db (diff)
downloadpratic-abe4094c23250f9c7ea76b680c87d7b9a4e0265a.zip
pratic-abe4094c23250f9c7ea76b680c87d7b9a4e0265a.tar.gz
pratic-abe4094c23250f9c7ea76b680c87d7b9a4e0265a.tar.bz2
fixed error page on unauthorized access to service provider
Diffstat (limited to 'idp/extra/modules/saml2.py')
-rw-r--r--idp/extra/modules/saml2.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/idp/extra/modules/saml2.py b/idp/extra/modules/saml2.py
index 95b12f0..2b69363 100644
--- a/idp/extra/modules/saml2.py
+++ b/idp/extra/modules/saml2.py
@@ -75,7 +75,13 @@ class AlternateSaml2Directory(liberty.saml2.RootDirectory):
if not self.check_access_authorizations(login):
provider_id = login.remoteProviderId
provider_key = misc.get_provider_key(provider_id)
- label = misc.get_provider_and_label(provider_key)
+ try:
+ label = misc.get_provider_and_label(provider_key)[1]
+ except KeyError:
+ return template.error_page(_('''\
+You do not have required authorizations to access the service,
+you should contact the administration of your collectivity.'''))
+
return template.error_page(_('''\
You do not have required authorizations to access the "%s" service,
you should contact the administration of your collectivity.''') % label)