summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Doan <andy.doan@linaro.org>2017-06-09 13:56:06 -0500
committerAndy Doan <andy.doan@linaro.org>2017-06-09 13:56:06 -0500
commitb69f0d00fc037d91e840f313b2428b79779cc792 (patch)
treec09bc485eeba25292fcddc1a2d4584518394b653
parent4fafddd4d4ef58698e379d3954b263a8e1635267 (diff)
downloadpatchwork-tools-b69f0d00fc037d91e840f313b2428b79779cc792.tar.gz
linaro-metrics: disable the register link
We don't want people registering as they should only be using linaro ldap. Change-Id: I5ea748f46af6a4d1cb055536dc0f86e6471cdf16
-rw-r--r--linaro_metrics/templates/linaro_metrics/user-register.html8
-rw-r--r--linaro_metrics/urls.py1
-rw-r--r--linaro_metrics/views.py4
3 files changed, 13 insertions, 0 deletions
diff --git a/linaro_metrics/templates/linaro_metrics/user-register.html b/linaro_metrics/templates/linaro_metrics/user-register.html
new file mode 100644
index 0000000..9404508
--- /dev/null
+++ b/linaro_metrics/templates/linaro_metrics/user-register.html
@@ -0,0 +1,8 @@
+{% extends "base.html" %}
+{% block body %}
+
+<h2>Forbidden</h2>
+<p>The Linaro patchwork instance only allows Linaro LDAP users. You should be
+able to login to this server using your linaro-login email address.</p>
+
+{% endblock %}
diff --git a/linaro_metrics/urls.py b/linaro_metrics/urls.py
index c8dbe35..bea47b3 100644
--- a/linaro_metrics/urls.py
+++ b/linaro_metrics/urls.py
@@ -13,6 +13,7 @@ urlpatterns = patterns(
(r'^$', 'linaro_metrics.views.index_view'),
(r'^project/(?P<project_id>[^/]+)/list/$',
'linaro_metrics.views.project_view'),
+ url(r'^register/', 'linaro_metrics.views.user_register'),
# Include all the standard patchwork urls.
url(r'^', include(patchwork.urls)),
diff --git a/linaro_metrics/views.py b/linaro_metrics/views.py
index fc5dcfc..f1da40d 100644
--- a/linaro_metrics/views.py
+++ b/linaro_metrics/views.py
@@ -239,3 +239,7 @@ def old_patch_link(request, patch):
return redirect('https://patches-old.linaro.org/%d/' % patch)
# its a patch both databases have, so show our version
return redirect('patch-detail', patch_id=patch)
+
+
+def user_register(request):
+ return render(request, 'linaro_metrics/user-register.html')