Added permissions, reworked registration, added minimal django group support

This commit is contained in:
Raynaldo Rivera
2014-10-06 19:15:58 -07:00
parent eacb3d03b8
commit d2d3f0ec85
10 changed files with 112 additions and 45 deletions

View File

@@ -10,6 +10,10 @@
{% block content %}
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<div class="row">
{% if apikeypairs %}
{% else %}
<div class="alert alert-danger" role="alert">No api keys found</div>
{% endif %}
<h1 class="page-header text-center">API Key Management</h1>
<table class="table table-bordered">
<tr>
@@ -35,7 +39,8 @@
<form class="form-signin" role="form" action="{% url 'auth_api_key_management' %}" method="POST">
{% csrf_token %}
{{ form|bootstrap_horizontal }}
<button class="btn btn-lg btn-primary btn-block" type="submit">Create Key</button>
<br/>
<button class="btn btn-lg btn-primary btn-block" type="submit">Add Key</button>
</form>
</div>
</div>

View File

@@ -9,6 +9,7 @@
{% block content %}
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<h1 class="page-header text-center">Available Applications</h1>
{% if perms.authentication.alliance_member %}
<table class="table table-bordered">
<tr>
<th class="text-center">Application</th>
@@ -64,6 +65,9 @@
</td>
</tr>
</table>
{% else %}
<div class="alert alert-danger" role="alert">You are not in the alliance</div>
{% endif %}
</div>
{% endblock content %}

View File

@@ -9,6 +9,10 @@
{% block content %}
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<div class="row">
{% if request.user.main_char_id %}
{% else %}
<div class="alert alert-danger" role="alert">No primary character set</div>
{% endif %}
{% for character in characters %}
<div class="well well-sm profile">
<div class="col-sm-12">
@@ -25,7 +29,13 @@
</div>
</div>
<div class="col-md-offset-8">
<a href="/main_character_change/{{character.character_id}}"><button type="button" class="btn btn-primary">Make Primary</button></a>
<a href="/main_character_change/{{character.character_id}}">
{% ifequal character.character_id request.user.main_char_id %}
<button type="button" class="btn btn-disable" disabled>Make Primary</button>
{% else %}
<button type="button" class="btn btn-primary">Make Primary</button>
{% endifequal %}
</a>
</div>
</div>
{% endfor %}