mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-14 15:00:16 +02: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:
commit
3e4fc7ceb4
@ -215,52 +215,6 @@ If `True`, add members to groups with their alliance name, prefixed with `Allian
|
|||||||
If `True`, add blues to groups with their corp name, prefixed with `Corp_`
|
If `True`, add blues to groups with their corp name, prefixed with `Corp_`
|
||||||
### BLUE_ALLIANCE_GROUPS
|
### BLUE_ALLIANCE_GROUPS
|
||||||
If `True`, add blues to groups with their alliance name, prefixed with `Alliance_`
|
If `True`, add blues to groups with their alliance name, prefixed with `Alliance_`
|
||||||
## Alliance Service Setup
|
|
||||||
### ENABLE_AUTH_FORUM
|
|
||||||
Allow members of the owning corp or alliance to generate accounts on a Phpbb3 install.
|
|
||||||
### ENABLE_AUTH_JABBER
|
|
||||||
Allow members of the owning corp or alliance to generate accounts on an Openfire install.
|
|
||||||
### ENABLE_AUTH_MUMBLE
|
|
||||||
Allow members of the owning corp or alliance to generate accounts on a Mumble install.
|
|
||||||
### ENABLE_AUTH_IPBOARD
|
|
||||||
Allow members of the owning corp or alliance to generate accounts on an IPBoard install.
|
|
||||||
### ENABLE_AUTH_TEAMSPEAK3
|
|
||||||
Allow members of the owning corp or alliance to generate accounts on a Teamspeak3 install.
|
|
||||||
### ENABLE_AUTH_DISCORD
|
|
||||||
Allow members of the owning corp or alliance to link accounts to a Discord server.
|
|
||||||
### ENABLE_AUTH_DISCOURSE
|
|
||||||
Allow members of the owning corp or alliance to generate accounts on a Discourse install
|
|
||||||
### ENABLE_AUTH_IPS4
|
|
||||||
Allow members of the owning corp or alliance to generate accounts on a IPSuite4 install.
|
|
||||||
### ENABLE_AUTH_SMF
|
|
||||||
Allow members of the owning corp or alliance to generate accounts on a SMF install.
|
|
||||||
### ENABLE_AUTH_MARKET
|
|
||||||
Allow members of the owning corp or alliance to generate accounts on an alliance market install.
|
|
||||||
### ENABLE_AUTH_XENFORO
|
|
||||||
Allow members of the owning corp or alliance to generate accounts on a XenForo install.
|
|
||||||
## Blue Service Setup
|
|
||||||
### ENABLE_BLUE_FORUM
|
|
||||||
Allow blues of the owning corp or alliance to generate accounts on a Phpbb3 install.
|
|
||||||
### ENABLE_BLUE_JABBER
|
|
||||||
Allow blues of the owning corp or alliance to generate accounts on an Openfire install.
|
|
||||||
### ENABLE_BLUE_MUMBLE
|
|
||||||
Allow blues of the owning corp or alliance to generate accounts on a Mumble install.
|
|
||||||
### ENABLE_BLUE_IPBOARD
|
|
||||||
Allow blues of the owning corp or alliance to generate accounts on an IPBoard install.
|
|
||||||
### ENABLE_BLUE_TEAMSPEAK3
|
|
||||||
Allow blues of the owning corp or alliance to generate accounts on a Teamspeak3 install.
|
|
||||||
### ENABLE_BLUE_DISCORD
|
|
||||||
Allow blues of the owning corp or alliance to link accounts to a Discord server.
|
|
||||||
### ENABLE_BLUE_DISCOURSE
|
|
||||||
Allow blues of the owning corp or alliance to generate accounts on a Discourse install.
|
|
||||||
### ENABLE_BLUE_IPS4
|
|
||||||
Allow blues of the owning corp or alliance to generate accounts on an IPSuite4 install.
|
|
||||||
### ENABLE_BLUE_SMF
|
|
||||||
Allow blues of the owning corp or alliance to generate accounts on a SMF install.
|
|
||||||
### ENABLE_BLUE_MARKET
|
|
||||||
Allow blues of the owning corp or alliance to generate accounts on an alliance market install.
|
|
||||||
### ENABLE_BLUE_XENFORO
|
|
||||||
Allow blues of the owning corp or alliance to generate accounts on a XenForo install.
|
|
||||||
## Tenant Configuration
|
## Tenant Configuration
|
||||||
Characters of any corp or alliance with their ID here will be treated as a member.
|
Characters of any corp or alliance with their ID here will be treated as a member.
|
||||||
### CORP_IDS
|
### CORP_IDS
|
||||||
|
@ -121,7 +121,7 @@ class DiscordTasks:
|
|||||||
def update_all_nicknames():
|
def update_all_nicknames():
|
||||||
logger.debug("Updating ALL discord nicknames")
|
logger.debug("Updating ALL discord nicknames")
|
||||||
for discord_user in DiscordUser.objects.exclude(uid__exact=''):
|
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
|
@classmethod
|
||||||
def disable(cls):
|
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"><a href="https://discordapp.com/channels/{{ DISCORD_SERVER_ID }}/{{ DISCORD_SERVER_ID}}">https://discordapp.com</a></td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
{% if not discord_uid %}
|
{% 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>
|
<span class="glyphicon glyphicon-ok"></span>
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% 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>
|
<span class="glyphicon glyphicon-refresh"></span>
|
||||||
</a>
|
</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>
|
<span class="glyphicon glyphicon-remove"></span>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -4,5 +4,5 @@
|
|||||||
<td class="text-center">{{ char.character_name }}</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"><a href="{{ DISCOURSE_URL }}">{{ DISCOURSE_URL }}</a></td>
|
||||||
<td class="text-center">
|
<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>
|
</td>
|
||||||
|
@ -21,6 +21,7 @@ class MumbleService(ServicesHook):
|
|||||||
self.urlpatterns = urlpatterns
|
self.urlpatterns = urlpatterns
|
||||||
self.service_url = settings.MUMBLE_URL
|
self.service_url = settings.MUMBLE_URL
|
||||||
self.access_perm = 'mumble.access_mumble'
|
self.access_perm = 'mumble.access_mumble'
|
||||||
|
self.service_ctrl_template = 'registered/mumble_service_ctrl.html'
|
||||||
|
|
||||||
def delete_user(self, user, notify_user=False):
|
def delete_user(self, user, notify_user=False):
|
||||||
logging.debug("Deleting user %s %s account" % (user, self.name))
|
logging.debug("Deleting user %s %s account" % (user, self.name))
|
||||||
@ -57,6 +58,7 @@ class MumbleService(ServicesHook):
|
|||||||
'service_name': self.title,
|
'service_name': self.title,
|
||||||
'urls': urls,
|
'urls': urls,
|
||||||
'service_url': self.service_url,
|
'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 '',
|
'username': request.user.mumble.username if MumbleTasks.has_account(request.user) else '',
|
||||||
}, request=request)
|
}, 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 %}
|
{% 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>
|
<tr>
|
||||||
<td class="text-center">Teamspeak 3</td>
|
<td class="text-center">Teamspeak 3</td>
|
||||||
<td class="text-center">{{ authinfo.teamspeak3_uid }}</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">
|
<td class="text-center">
|
||||||
{% ifequal authinfo.teamspeak3_uid "" %}
|
{% 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>
|
<span class="glyphicon glyphicon-ok"></span>
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="ts3server://{{ TEAMSPEAK3_PUBLIC_URL }}?token={{ authinfo.teamspeak3_perm_key }}&nickname={{ authinfo.teamspeak3_uid }}"
|
<a href="{% url 'auth_verify_teamspeak3' %}" title="Verify Client ID" class="btn btn-success" title="Verify">
|
||||||
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">
|
|
||||||
<span class="glyphicon glyphicon-log-in"></span>
|
<span class="glyphicon glyphicon-log-in"></span>
|
||||||
</a>
|
</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>
|
<span class="glyphicon glyphicon-refresh"></span>
|
||||||
</a>
|
</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>
|
<span class="glyphicon glyphicon-remove"></span>
|
||||||
</a>
|
</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 %}
|
{% endifequal %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -52,7 +52,7 @@ def m2m_changed_user_permissions(sender, instance, action, *args, **kwargs):
|
|||||||
svc.validate_user(instance)
|
svc.validate_user(instance)
|
||||||
except:
|
except:
|
||||||
logger.exception(
|
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())
|
transaction.on_commit(lambda: validate_all_services())
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<h1 class="page-header text-center">{% trans "Available Services" %}</h1>
|
<h1 class="page-header text-center">{% trans "Available Services" %}</h1>
|
||||||
<table class="table table-bordered">
|
<table class="table table-hover">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-center">{% trans "Service" %}</th>
|
<th class="text-center">{% trans "Service" %}</th>
|
||||||
<th class="text-center">{% trans "Username" %}</th>
|
<th class="text-center">{% trans "Username" %}</th>
|
||||||
|
@ -7,23 +7,23 @@
|
|||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
{% ifequal username "" %}
|
{% ifequal username "" %}
|
||||||
{% if urls.auth_activate %}
|
{% if urls.auth_activate %}
|
||||||
<a href="{% url urls.auth_activate %}" class="btn btn-warning">
|
<a href="{% url urls.auth_activate %}" title="Activate" class="btn btn-warning">
|
||||||
<span class="glyphicon glyphicon-ok"></span>
|
<span class="glyphicon glyphicon-ok"></span>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if urls.auth_set_password %}
|
{% if urls.auth_set_password %}
|
||||||
<a href="{% url urls.auth_set_password %}" class="btn btn-warning">
|
<a href="{% url urls.auth_set_password %}" title="Set Password" class="btn btn-warning">
|
||||||
<span class="glyphicon glyphicon-pencil"></span>
|
<span class="glyphicon glyphicon-pencil"></span>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if urls.auth_reset_password %}
|
{% if urls.auth_reset_password %}
|
||||||
<a href="{% url urls.auth_reset_password %}" class="btn btn-primary">
|
<a href="{% url urls.auth_reset_password %}" title="Reset Password" class="btn btn-primary">
|
||||||
<span class="glyphicon glyphicon-refresh"></span>
|
<span class="glyphicon glyphicon-refresh"></span>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if urls.auth_deactivate %}
|
{% if urls.auth_deactivate %}
|
||||||
<a href="{% url urls.auth_deactivate %}" class="btn btn-danger">
|
<a href="{% url urls.auth_deactivate %}" title="Deactivate" class="btn btn-danger">
|
||||||
<span class="glyphicon glyphicon-remove"></span>
|
<span class="glyphicon glyphicon-remove"></span>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user