Commit 1f3573fd authored by David Haynes's avatar David Haynes 🙆
Browse files

Merge branch 'issue18' into 'master'

Restricts who can view signup page Closes #18

- Now with more branches!

See merge request !14
parents 18dd5e85 0dc8bb9b
...@@ -134,9 +134,15 @@ Go - Signup ...@@ -134,9 +134,15 @@ Go - Signup
</div> </div>
{% else %} {% else %}
<div class="col-md-12"> {% if not approved %}
<p>You are already signed up for Go.</p> <div class="col-md-12">
</div> <p>You have already submitted a request for approval to use Go.</p>
</div>
{% else %}
<div class="col-md-12">
<p>You are already approved to use Go.</p>
</div>
{% endif %}
{% endif %} {% endif %}
</div> </div>
{% endblock %} {% endblock %}
...@@ -211,9 +211,17 @@ def signup(request): ...@@ -211,9 +211,17 @@ def signup(request):
yourself, or another person. yourself, or another person.
""" """
# Do not display signup page to registered or approved users (Staff can still see these pages)
if is_registered(request.user) and not request.user.is_staff: if is_registered(request.user) and not request.user.is_staff:
return render(request, 'signup.html', { return render(request, 'signup.html', {
'registered': True, 'registered': True,
'approved': False,
},
)
elif is_approved(request.user) and not request.user.is_staff:
return render(request, 'signup.html', {
'registered': True,
'approved': True,
}, },
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment