Commit 2843c67b authored by Jean Michel Rouly's avatar Jean Michel Rouly
Browse files

added a public landing page instead of redirecting the the login page immediately

parent a25d3dc4
{% extends 'base.html' %}
{% block title %}
Go - Welcome
{% endblock %}
{% block content %}
<div class="page-header" id="banner">
<div class="row">
<div class="col-md-12">
<h1><strong>Go</strong></h1>
<p class="lead">University-branded URL shortening.</p>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h3>What is Go?</h3>
<p>
Mason Go is a product of the George Mason University
<a href="http://srct.gmu.edu">Student-Run Computing and Technology</a>
organization. Go provides University-branded URL shortening for administration,
ULife groups, and student organizations. Access is moderated by SRCT
administrators. Please log in in order to submit an access request.
</p>
<a href="{% url 'go_login' %}" class="btn btn-success">Log In</a>
</div>
</div>
{% endblock %}
...@@ -75,7 +75,6 @@ Define user views here. ...@@ -75,7 +75,6 @@ Define user views here.
""" """
@login_required
def index(request): def index(request):
""" """
This view handles the homepage that the user is presented with when This view handles the homepage that the user is presented with when
...@@ -85,6 +84,10 @@ def index(request): ...@@ -85,6 +84,10 @@ def index(request):
get the URL registration form. get the URL registration form.
""" """
# If the user is not authenticated, show them a public landing page.
if not request.user.is_authenticated():
return render(request, 'public_landing.html')
# If the user isn't registered, don't give them any leeway. # If the user isn't registered, don't give them any leeway.
if not is_approved(request.user): if not is_approved(request.user):
return render(request, 'not_registered.html') return render(request, 'not_registered.html')
......
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