Skip to content

Commit 1b976ab

Browse files
committed
Add view to edit groups public key.
See ietf-tools#905 - Legacy-Id: 5071
1 parent 8984e88 commit 1b976ab

4 files changed

Lines changed: 40 additions & 3 deletions

File tree

ietf/ietfauth/urls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
urlpatterns = patterns('',
77
(r'^$', views.index, None, 'account_index'),
8-
(r'^login/$', views.ietf_login),
8+
# (r'^login/$', views.ietf_login),
99
(r'^loggedin/$', views.ietf_loggedin),
1010
(r'^profile/$', views.profile),
11-
# (r'^login/(?P<user>[a-z0-9.@]+)/(?P<passwd>.+)$', views.url_login),
11+
(r'^login/(?P<user>[a-z0-9.@]+)/(?P<passwd>.+)$', views.url_login),
1212
(r'^testemail/$', views.test_email),
1313
)
1414

ietf/ietfauth/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def url_login(request, user, passwd):
5757
if user is not None:
5858
if user.is_active:
5959
login(request, user)
60-
return HttpResponseRedirect('/accounts/loggedin/?%s=%s' % (REDIRECT_FIELD_NAME, urlquote(redirect_to)))
60+
return HttpResponseRedirect('/admin')
6161
return HttpResponse("Not authenticated?", status=500)
6262

6363
def ietf_login(request):
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{% extends "base.html" %}
2+
3+
{% block title %}Edit {{ state.group.acronym }} public key{% endblock %}
4+
5+
{% block content %}
6+
<h1>Edit {{ state.group.acronym }} public key</h1>
7+
8+
{% if form.errors %}<h3>Please correct the following errors</h3>{% endif %}
9+
10+
<form action="" method="post">{% csrf_token %}
11+
<table>
12+
{{ form }}
13+
</table>
14+
<input type="hidden" name="{{ stage_field }}" value="1" />
15+
<p><input type="submit" value="Preview" /></p>
16+
</form>
17+
18+
{% endblock %}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{% extends "base.html" %}
2+
3+
{% block title %}Edit {{ state.group.acronym }} public key{% endblock %}
4+
5+
{% block content %}
6+
<h1>Edit {{ state.group.acronym }} public key</h1>
7+
8+
<p>Previous data will remain encrypted with the old key. Do you really want to change the public key?. </p
9+
10+
<table>
11+
<form action="" method="post">{% csrf_token %}
12+
{% for field in form %}{{ field.as_hidden }}
13+
{% endfor %}
14+
<input type="hidden" name="{{ stage_field }}" value="2" />
15+
<input type="hidden" name="{{ hash_field }}" value="{{ hash_value }}" />
16+
<p><input type="submit" value="Submit" /></p>
17+
</form>
18+
19+
{% endblock %}

0 commit comments

Comments
 (0)