mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-12 22:10: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)
|
||||
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):
|
||||
syncgroups = SyncGroupCache.objects.filter(user=user)
|
||||
authserviceinfo = AuthServicesInfo.objects.get(user=user)
|
||||
@ -113,8 +116,8 @@ def update_teamspeak3_groups(user):
|
||||
for filtered_group in filtered_groups:
|
||||
for ts_group in filtered_group.ts_group.all():
|
||||
groups[ts_group.ts_group_name] = ts_group.ts_group_id
|
||||
|
||||
Teamspeak3Manager.update_groups(authserviceinfo.teamspeak3_uid, groups)
|
||||
if (is_teamspeak3_active()):
|
||||
Teamspeak3Manager.update_groups(authserviceinfo.teamspeak3_uid, groups)
|
||||
|
||||
def update_discord_groups(user):
|
||||
logger.debug("Updating discord groups for user %s" % user)
|
||||
@ -238,9 +241,9 @@ def remove_from_databases(user, groups, syncgroups):
|
||||
def run_databaseUpdate():
|
||||
logger.debug("Starting database update.")
|
||||
users = User.objects.all()
|
||||
logger.debug("Syncing TS groups.")
|
||||
Teamspeak3Manager._sync_ts_group_db()
|
||||
logger.debug("Finished syncing TS groups.")
|
||||
if (is_teamspeak3_active()):
|
||||
logger.debug("TS3 installed. Syncing local group objects.")
|
||||
Teamspeak3Manager._sync_ts_group_db()
|
||||
for user in users:
|
||||
logger.debug("Initiating database update for user %s" % user)
|
||||
groups = user.groups.all()
|
||||
|
@ -94,6 +94,11 @@
|
||||
Station
|
||||
</div>
|
||||
{% endifequal %}
|
||||
{% ifequal closest_timer.structure "TCU" %}
|
||||
<div class="label label-danger">
|
||||
TCU
|
||||
</div>
|
||||
{% endifequal %}
|
||||
{% ifequal closest_timer.structure "Other" %}
|
||||
<div class="label label-default">
|
||||
Other
|
||||
@ -188,7 +193,12 @@
|
||||
<div class="label label-danger">
|
||||
Station
|
||||
</div>
|
||||
{% endifequal %}
|
||||
{% endifequal %}
|
||||
{% ifequal timer.structure "TCU" %}
|
||||
<div class="label label-danger">
|
||||
TCU
|
||||
</div>
|
||||
{% endifequal %}
|
||||
{% ifequal timer.structure "Other" %}
|
||||
<div class="label label-default">
|
||||
Other
|
||||
|
@ -5,7 +5,7 @@ from django.core.validators import MaxValueValidator, MinValueValidator
|
||||
|
||||
class TimerForm(forms.Form):
|
||||
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')]
|
||||
|
||||
details = forms.CharField(max_length=254, required=True, label='Details')
|
||||
|
Loading…
x
Reference in New Issue
Block a user