mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-06 07:06:19 +01:00
Merge branch 'master' of https://github.com/Adarnof/allianceauth into custom_user
# Conflicts: # alliance_auth/settings.py.example # eveonline/views.py
This commit is contained in:
@@ -121,7 +121,7 @@ class DiscordTasks:
|
||||
def update_all_nicknames():
|
||||
logger.debug("Updating ALL discord nicknames")
|
||||
for discord_user in DiscordUser.objects.exclude(uid__exact=''):
|
||||
DiscordTasks.update_nickname.delay(discord_user.user.user_id)
|
||||
DiscordTasks.update_nickname.delay(discord_user.user.pk)
|
||||
|
||||
@classmethod
|
||||
def disable(cls):
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
<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">
|
||||
{% if not discord_uid %}
|
||||
<a href="{% url 'auth_activate_discord' %}" class="btn btn-warning">
|
||||
<a href="{% url 'auth_activate_discord' %}" title="Activate" class="btn btn-warning">
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{% url 'auth_reset_discord' %}" class="btn btn-primary">
|
||||
<a href="{% url 'auth_reset_discord' %}" title="Reset" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-refresh"></span>
|
||||
</a>
|
||||
<a href="{% url 'auth_deactivate_discord' %}" class="btn btn-danger">
|
||||
<a href="{% url 'auth_deactivate_discord' %}" title="Deactivate" class="btn btn-danger">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
<td class="text-center">{{ char.character_name }}</td>
|
||||
<td class="text-center"><a href="{{ DISCOURSE_URL }}">{{ DISCOURSE_URL }}</a></td>
|
||||
<td class="text-center">
|
||||
<a class="btn btn-success" href="{{ DISCOURSE_URL }}"><span class="glyphicon glyphicon-arrow-right"></span></a>
|
||||
<a title="Go To Forums" class="btn btn-success" href="{{ DISCOURSE_URL }}"><span class="glyphicon glyphicon-arrow-right"></span></a>
|
||||
</td>
|
||||
|
||||
@@ -21,6 +21,7 @@ class MumbleService(ServicesHook):
|
||||
self.urlpatterns = urlpatterns
|
||||
self.service_url = settings.MUMBLE_URL
|
||||
self.access_perm = 'mumble.access_mumble'
|
||||
self.service_ctrl_template = 'registered/mumble_service_ctrl.html'
|
||||
|
||||
def delete_user(self, user, notify_user=False):
|
||||
logging.debug("Deleting user %s %s account" % (user, self.name))
|
||||
@@ -57,6 +58,7 @@ class MumbleService(ServicesHook):
|
||||
'service_name': self.title,
|
||||
'urls': urls,
|
||||
'service_url': self.service_url,
|
||||
'connect_url': request.user.mumble.username + '@' + self.service_url if MumbleTasks.has_account(request.user) else self.service_url,
|
||||
'username': request.user.mumble.username if MumbleTasks.has_account(request.user) else '',
|
||||
}, request=request)
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<tr>
|
||||
<td class="text-center">{{ service_name }}</td>
|
||||
<td class="text-center">{{ username }}</td>
|
||||
<td class="text-center"><a href="mumble://{{ service_url }}">{{ service_url }}</a></td>
|
||||
<td class="text-center">
|
||||
{% ifequal username "" %}
|
||||
<a href="{% url urls.auth_activate %}" title="Activate" class="btn btn-warning">
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{% url urls.auth_set_password %}" title="Set Password" class="btn btn-warning">
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
</a>
|
||||
<a href="{% url urls.auth_reset_password %}" title="Reset Password" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-refresh"></span>
|
||||
</a>
|
||||
<a href="{% url urls.auth_deactivate %}" title="Deactivate" class="btn btn-danger">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</a>
|
||||
<a href="mumble://{{ connect_url }}" class="btn btn-success" title="Connect">
|
||||
<span class="glyphicon glyphicon-arrow-right"></span>
|
||||
</a>
|
||||
{% endifequal %}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1,34 +1,27 @@
|
||||
{% load i18n %}
|
||||
|
||||
<tr>
|
||||
<th class="text-center">{% trans "Service" %}</th>
|
||||
<th class="text-center">{% trans "Unique ID" %}</th>
|
||||
<th class="text-center">PermissionKey</th>
|
||||
<th class="text-center">{% trans "Action" %}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center">Teamspeak 3</td>
|
||||
<td class="text-center">{{ authinfo.teamspeak3_uid }}</td>
|
||||
<td class="text-center">{{ authinfo.teamspeak3_perm_key }}</td>
|
||||
<td class="text-center"><a href="ts3server://{{ TEAMSPEAK3_PUBLIC_URL }}">{{ TEAMSPEAK3_PUBLIC_URL }}</a></td>
|
||||
<td class="text-center">
|
||||
{% ifequal authinfo.teamspeak3_uid "" %}
|
||||
<a href="{% url 'auth_activate_teamspeak3' %}" class="btn btn-warning">
|
||||
<a href="{% url 'auth_activate_teamspeak3' %}" title="Activate" class="btn btn-warning">
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="ts3server://{{ TEAMSPEAK3_PUBLIC_URL }}?token={{ authinfo.teamspeak3_perm_key }}&nickname={{ authinfo.teamspeak3_uid }}"
|
||||
title="{% trans "Quick Link" %}" class="btn btn-info">
|
||||
<span class="glyphicon glyphicon-link"></span>
|
||||
</a>
|
||||
<a href="{% url 'auth_verify_teamspeak3' %}" class="btn btn-success" title="Verify">
|
||||
<a href="{% url 'auth_verify_teamspeak3' %}" title="Verify Client ID" class="btn btn-success" title="Verify">
|
||||
<span class="glyphicon glyphicon-log-in"></span>
|
||||
</a>
|
||||
<a href="{% url 'auth_reset_teamspeak3_perm' %}" class="btn btn-primary">
|
||||
<a href="{% url 'auth_reset_teamspeak3_perm' %}" title="Refresh Token" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-refresh"></span>
|
||||
</a>
|
||||
<a href="{% url 'auth_deactivate_teamspeak3' %}" class="btn btn-danger">
|
||||
<a href="{% url 'auth_deactivate_teamspeak3' %}" title="Deactivate" class="btn btn-danger">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</a>
|
||||
<a href="ts3server://{{ TEAMSPEAK3_PUBLIC_URL }}?nickname={{ authinfo.teamspeak3_uid }}" title="Connect" class="btn btn-success">
|
||||
<span class="glyphicon glyphicon-arrow-right"></span>
|
||||
</a>
|
||||
{% endifequal %}
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
|
||||
@@ -52,7 +52,7 @@ def m2m_changed_user_permissions(sender, instance, action, *args, **kwargs):
|
||||
svc.validate_user(instance)
|
||||
except:
|
||||
logger.exception(
|
||||
'Exception running validate_user for services module {} on user {}'.format(svc, user))
|
||||
'Exception running validate_user for services module {} on user {}'.format(svc, instance))
|
||||
|
||||
transaction.on_commit(lambda: validate_all_services())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user