aboutsummaryrefslogtreecommitdiff
path: root/portal-gui
diff options
context:
space:
mode:
authorMichael Elkins <melkins@tislabs.com>2010-07-09 04:39:23 +0000
committerMichael Elkins <melkins@tislabs.com>2010-07-09 04:39:23 +0000
commite1b926ad40a412734185ec1012ba3ae203b6e4fb (patch)
tree4ab6064b1b9c289999eab7b757ff08686d4d1331 /portal-gui
parentb8caf3351bc044c156a7dfd8fab87189f4239114 (diff)
add nice error page when an account no permission to manage any handles
svn path=/portal-gui/rpkigui/myrpki/views.py; revision=3372
Diffstat (limited to 'portal-gui')
-rw-r--r--portal-gui/rpkigui/myrpki/views.py3
-rw-r--r--portal-gui/rpkigui/templates/myrpki/conf_empty.html8
2 files changed, 10 insertions, 1 deletions
diff --git a/portal-gui/rpkigui/myrpki/views.py b/portal-gui/rpkigui/myrpki/views.py
index a2a5a52a..748e1a22 100644
--- a/portal-gui/rpkigui/myrpki/views.py
+++ b/portal-gui/rpkigui/myrpki/views.py
@@ -31,7 +31,8 @@ def handle_required(f):
if conf.count() == 1:
handle = conf[0]
elif conf.count() == 0:
- return http.HttpResponseRedirect('/myrpki/conf/add')
+ return render('myrpki/conf_empty.html', {}, request)
+ #return http.HttpResponseRedirect('/myrpki/conf/add')
else:
# Should reverse the view for this instead of hardcoding
# the URL.
diff --git a/portal-gui/rpkigui/templates/myrpki/conf_empty.html b/portal-gui/rpkigui/templates/myrpki/conf_empty.html
new file mode 100644
index 00000000..0ef9366c
--- /dev/null
+++ b/portal-gui/rpkigui/templates/myrpki/conf_empty.html
@@ -0,0 +1,8 @@
+{% extends "base.html" %}
+
+{% block content %}
+
+<h1>Error!</h1>
+<p>Your account does not have permission to manage any resource handles on this server. Please contact your portal-gui operator.
+
+{% endblock %}