Discourse SSO (#560)

* Alter Discourse support to act as SSO provider.
Correct service group sync retry queueing.

* Correct default database enviroment variable names.

* Redirect to requested page after succesful login.

* Correct default redirect handling.
Correct attribute used to logout users on Discourse.
Improve logging messages to use parsed path on Discourse.

* Correct task retry syntax using bind=True.
Inherit from base exception so can catch TeamspeakErrors.
This commit is contained in:
Adarnof
2016-10-25 14:52:12 -04:00
committed by GitHub
parent 1daf77709d
commit 4ff21b25c3
14 changed files with 252 additions and 166 deletions

View File

@@ -60,6 +60,7 @@
{% csrf_token %}
<h2 class="form-signin-heading text-center">{% trans "Please sign in" %}</h2>
{{ form|bootstrap }}
<input type="hidden" name="next" value="{{ request.GET.next }}" />
<div class="row">
<div class="col-md-12">
<button class="btn btn-lg btn-primary btn-block" type="submit">{% trans "Sign in" %}</button>

View File

@@ -238,18 +238,10 @@
{% endif %}
{% if SHOW_DISCOURSE %}
<td class="text-center">Discourse</td>
<td class="text-center">{{ authinfo.discourse_username }}</td>
<td class="text-center">{{ char.character_name }}</td>
<td class="text-center"><a href="{{ DISCOURSE_URL }}">{{ DISCOURSE_URL }}</a></td>
<td class="text-center">
{% ifequal authinfo.discourse_username "" %}
<a href="{% url 'auth_activate_discourse' %}" class="btn btn-warning">
<span class="glyphicon glyphicon-ok"></span>
</a>
{% else %}
<a href="{% url 'auth_deactivate_discourse' %}" class="btn btn-danger">
<span class="glyphicon glyphicon-remove"></span>
</a>
{% endifequal %}
<a class="btn btn-success" href="{{ DISCOURSE_URL }}"><span class="glyphicon glyphicon-arrow-right"></span></a>
</td>
{% endif %}
{% if SHOW_TEAMSPEAK3 %}