mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-10 17:16:22 +01:00
Added blue support to the auth
This commit is contained in:
@@ -56,3 +56,11 @@ class AuthServicesInfoManager:
|
||||
authserviceinfo.mumble_username = username
|
||||
authserviceinfo.mumble_password = password
|
||||
authserviceinfo.save(update_fields=['mumble_username', 'mumble_password'])
|
||||
|
||||
@staticmethod
|
||||
def update_is_blue(is_blue, user):
|
||||
if User.objects.filter(username=user.username).exists():
|
||||
authserviceinfo = AuthServicesInfoManager.__get_or_create(user)
|
||||
authserviceinfo.is_blue = is_blue
|
||||
authserviceinfo.save(update_fields=['is_blue'])
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ class AuthServicesInfo(models.Model):
|
||||
mumble_username = models.CharField(max_length=254, default="")
|
||||
mumble_password = models.CharField(max_length=254, default="")
|
||||
main_char_id = models.CharField(max_length=64, default="")
|
||||
|
||||
is_blue = models.BooleanField(default=False)
|
||||
user = models.ForeignKey(User)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
Reference in New Issue
Block a user