mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-10 09:06:21 +01:00
Changed discord account handling. Now requests email and password and grabs UID via API.
UID is stored in authserviceinfo model and used as required.
This commit is contained in:
33
stock/templates/registered/discord.html
Normal file
33
stock/templates/registered/discord.html
Normal file
@@ -0,0 +1,33 @@
|
||||
{% extends "public/base.html" %}
|
||||
{% load bootstrap %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block title %}Alliance Auth{% endblock %}
|
||||
|
||||
{% block page_title %}Jabber Broadcast{% endblock page_title %}
|
||||
{% block extra_css %}{% endblock extra_css %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">Discord Connection</h1>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="row">
|
||||
{% if success %}
|
||||
<div class="alert alert-success" role="alert">Account Linked</div>
|
||||
{% endif %}
|
||||
<p>Enter your discord account credentials below. These are not stored: they are needed to determine your user ID and make you join the server.</p>
|
||||
<form class="form-signin" role="form" action="" method="POST"
|
||||
onsubmit="submitbutton.disabled = true; return true;">
|
||||
{% csrf_token %}
|
||||
{{ form|bootstrap }}
|
||||
<br/>
|
||||
<button class="btn btn-lg btn-primary btn-block" name="submitbutton" type="submit">Connect</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
@@ -117,11 +117,11 @@
|
||||
{% if ENABLE_BLUE_DISCORD %}
|
||||
<tr>
|
||||
<td class="text-center">Discord</td>
|
||||
<td class="text-center">{{ authinfo.discord_username }}</td>
|
||||
<td class="text-center">{{ authinfo.discord_password }}</td>
|
||||
<td class="text-center">{{ authinfo.discord_uid }}</td>
|
||||
<td class="text-center"></td>
|
||||
<td class="text-center"><a href="https://discordapp.com/channels/{{ DISCORD_SERVER_ID }}/{{ DISCORD_SERVER_ID}}">https://discordapp.com</a></td>
|
||||
<td class="text-center">
|
||||
{% ifequal authinfo.discord_username "" %}
|
||||
{% ifequal authinfo.discord_uid "" %}
|
||||
<a href="{% url 'auth_activate_discord' %}">
|
||||
<button type="button" class="btn btn-warning"><span
|
||||
class="glyphicon glyphicon-ok"></span></button>
|
||||
@@ -288,11 +288,11 @@
|
||||
{% if ENABLE_AUTH_DISCORD %}
|
||||
<tr>
|
||||
<td class="text-center">Discord</td>
|
||||
<td class="text-center">{{ authinfo.discord_username }}</td>
|
||||
<td class="text-center">{{ authinfo.discord_password }}</td>
|
||||
<td class="text-center">{{ authinfo.discord_uid }}</td>
|
||||
<td class="text-center"></td>
|
||||
<td class="text-center"><a href="https://discordapp.com/channels/{{ DISCORD_SERVER_ID }}/{{ DISCORD_SERVER_ID}}">https://discordapp.com</a></td>
|
||||
<td class="text-center">
|
||||
{% ifequal authinfo.discord_username "" %}
|
||||
{% ifequal authinfo.discord_uid "" %}
|
||||
<a href="{% url 'auth_activate_discord' %}">
|
||||
<button type="button" class="btn btn-warning"><span
|
||||
class="glyphicon glyphicon-ok"></span></button>
|
||||
|
||||
Reference in New Issue
Block a user