summaryrefslogtreecommitdiffstats
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
parentb83566a8398a847de3e67c6dcc5149abe7a717db (diff)
downloadpratic-abe4094c23250f9c7ea76b680c87d7b9a4e0265a.zip
pratic-abe4094c23250f9c7ea76b680c87d7b9a4e0265a.tar.gz
pratic-abe4094c23250f9c7ea76b680c87d7b9a4e0265a.tar.bz2
fixed error page on unauthorized access to service provider
-rw-r--r--idp/extra/modules/saml2.py8
-rw-r--r--idp/po/fr.po12
-rw-r--r--idp/po/pratic.pot10
3 files changed, 25 insertions, 5 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)
diff --git a/idp/po/fr.po b/idp/po/fr.po
index 41250fd..490e41c 100644
--- a/idp/po/fr.po
+++ b/idp/po/fr.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pratic 0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-04-14 16:08+0200\n"
+"POT-Creation-Date: 2009-04-14 18:44+0200\n"
"PO-Revision-Date: 2008-01-18 10:50+0100\n"
"Last-Translator: Frederic Peters <fpeters@entrouvert.com>\n"
"Language-Team: none\n"
@@ -16,7 +16,15 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../extra/modules/saml2.py:79
+#: ../extra/modules/saml2.py:81
+msgid ""
+"You do not have required authorizations to access the service,\n"
+"you should contact the administration of your collectivity."
+msgstr ""
+"Vous n'avez pas les autorisations nécessaires pour accéder au service, "
+"vous devriez contacter l'administrateur de votre collectivité."
+
+#: ../extra/modules/saml2.py:85
#, python-format
msgid ""
"You do not have required authorizations to access the \"%s\" service,\n"
diff --git a/idp/po/pratic.pot b/idp/po/pratic.pot
index 9573e38..0ac8ca9 100644
--- a/idp/po/pratic.pot
+++ b/idp/po/pratic.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-04-14 16:08+0200\n"
+"POT-Creation-Date: 2009-04-14 18:44+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,7 +16,13 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../extra/modules/saml2.py:79
+#: ../extra/modules/saml2.py:81
+msgid ""
+"You do not have required authorizations to access the service,\n"
+"you should contact the administration of your collectivity."
+msgstr ""
+
+#: ../extra/modules/saml2.py:85
#, python-format
msgid ""
"You do not have required authorizations to access the \"%s\" service,\n"