Commit 0e718e46 authored by Brian Guadalupe's avatar Brian Guadalupe

Restrict viewing of profile pages to users only

parent c46efa41
......@@ -3,8 +3,8 @@
{% block title %}{{profile.username}}'s Profile{% endblock %}
{% block content %}
<div class="boxified main profile">
<div class="boxified main profile">
{% if user.is_authenticated %}
<h2>{{profile.username}}'s Profile</h2>
<ul>
<li><strong>First Name:</strong> {{profile.first_name}}</li>
......@@ -12,7 +12,10 @@
<li><strong>Email Address:</strong> {{profile.email}}</li>
</ul>
{% if profile.username == user.username and user.is_authenticated %}
<a href="#" class="buttoned">Edit user profile</a>
</div>
<a href="edit" class="buttoned">Edit user profile</a>
{% endif %}
{% else %}
<p>Please <a href="/login">log in</a> to your account to view {{profile.username}}'s profile.</p>
{% endif %}
</div>
{% endblock %}
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