mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-13 06:20:16 +02:00
Merge branch 'master' of https://github.com/R4stl1n/allianceauth into more_logging
Conflicts: celerytask/tasks.py
This commit is contained in:
commit
9225896938
@ -50,6 +50,9 @@ def disable_blue_member(user):
|
|||||||
deactivate_services(user)
|
deactivate_services(user)
|
||||||
AuthServicesInfoManager.update_is_blue(False, user)
|
AuthServicesInfoManager.update_is_blue(False, user)
|
||||||
|
|
||||||
|
def is_teamspeak3_active():
|
||||||
|
return settings.ENABLE_AUTH_TEAMSPEAK3 or settings.ENABLE_BLUE_TEAMSPEAK3
|
||||||
|
|
||||||
def update_jabber_groups(user):
|
def update_jabber_groups(user):
|
||||||
syncgroups = SyncGroupCache.objects.filter(user=user)
|
syncgroups = SyncGroupCache.objects.filter(user=user)
|
||||||
authserviceinfo = AuthServicesInfo.objects.get(user=user)
|
authserviceinfo = AuthServicesInfo.objects.get(user=user)
|
||||||
@ -113,8 +116,8 @@ def update_teamspeak3_groups(user):
|
|||||||
for filtered_group in filtered_groups:
|
for filtered_group in filtered_groups:
|
||||||
for ts_group in filtered_group.ts_group.all():
|
for ts_group in filtered_group.ts_group.all():
|
||||||
groups[ts_group.ts_group_name] = ts_group.ts_group_id
|
groups[ts_group.ts_group_name] = ts_group.ts_group_id
|
||||||
|
if (is_teamspeak3_active()):
|
||||||
Teamspeak3Manager.update_groups(authserviceinfo.teamspeak3_uid, groups)
|
Teamspeak3Manager.update_groups(authserviceinfo.teamspeak3_uid, groups)
|
||||||
|
|
||||||
def update_discord_groups(user):
|
def update_discord_groups(user):
|
||||||
logger.debug("Updating discord groups for user %s" % user)
|
logger.debug("Updating discord groups for user %s" % user)
|
||||||
@ -238,9 +241,9 @@ def remove_from_databases(user, groups, syncgroups):
|
|||||||
def run_databaseUpdate():
|
def run_databaseUpdate():
|
||||||
logger.debug("Starting database update.")
|
logger.debug("Starting database update.")
|
||||||
users = User.objects.all()
|
users = User.objects.all()
|
||||||
logger.debug("Syncing TS groups.")
|
if (is_teamspeak3_active()):
|
||||||
Teamspeak3Manager._sync_ts_group_db()
|
logger.debug("TS3 installed. Syncing local group objects.")
|
||||||
logger.debug("Finished syncing TS groups.")
|
Teamspeak3Manager._sync_ts_group_db()
|
||||||
for user in users:
|
for user in users:
|
||||||
logger.debug("Initiating database update for user %s" % user)
|
logger.debug("Initiating database update for user %s" % user)
|
||||||
groups = user.groups.all()
|
groups = user.groups.all()
|
||||||
|
@ -94,6 +94,11 @@
|
|||||||
Station
|
Station
|
||||||
</div>
|
</div>
|
||||||
{% endifequal %}
|
{% endifequal %}
|
||||||
|
{% ifequal closest_timer.structure "TCU" %}
|
||||||
|
<div class="label label-danger">
|
||||||
|
TCU
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
{% ifequal closest_timer.structure "Other" %}
|
{% ifequal closest_timer.structure "Other" %}
|
||||||
<div class="label label-default">
|
<div class="label label-default">
|
||||||
Other
|
Other
|
||||||
@ -188,7 +193,12 @@
|
|||||||
<div class="label label-danger">
|
<div class="label label-danger">
|
||||||
Station
|
Station
|
||||||
</div>
|
</div>
|
||||||
{% endifequal %}
|
{% endifequal %}
|
||||||
|
{% ifequal timer.structure "TCU" %}
|
||||||
|
<div class="label label-danger">
|
||||||
|
TCU
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
{% ifequal timer.structure "Other" %}
|
{% ifequal timer.structure "Other" %}
|
||||||
<div class="label label-default">
|
<div class="label label-default">
|
||||||
Other
|
Other
|
||||||
|
@ -5,7 +5,7 @@ from django.core.validators import MaxValueValidator, MinValueValidator
|
|||||||
|
|
||||||
class TimerForm(forms.Form):
|
class TimerForm(forms.Form):
|
||||||
structure_choices = [('POCO', 'POCO'), ('I-HUB', 'I-HUB'), ('POS[S]', 'POS[S]'),
|
structure_choices = [('POCO', 'POCO'), ('I-HUB', 'I-HUB'), ('POS[S]', 'POS[S]'),
|
||||||
('POS[M]', 'POS[M]'), ('POS[L]', 'POS[L]'), ('Station', 'Station'), ('Other', 'Other')]
|
('POS[M]', 'POS[M]'), ('POS[L]', 'POS[L]'), ('Station', 'Station'), ('TCU', 'TCU'), ('Other', 'Other')]
|
||||||
objective_choices = [('Friendly', 'Friendly'), ('Hostile', 'Hostile'), ('Neutral', 'Neutral')]
|
objective_choices = [('Friendly', 'Friendly'), ('Hostile', 'Hostile'), ('Neutral', 'Neutral')]
|
||||||
|
|
||||||
details = forms.CharField(max_length=254, required=True, label='Details')
|
details = forms.CharField(max_length=254, required=True, label='Details')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user