mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-05 06:36:19 +01:00
Added IPBoard support
This commit is contained in:
8
authentication/managers.py
Normal file → Executable file
8
authentication/managers.py
Normal file → Executable file
@@ -57,6 +57,14 @@ class AuthServicesInfoManager:
|
||||
authserviceinfo.mumble_password = password
|
||||
authserviceinfo.save(update_fields=['mumble_username', 'mumble_password'])
|
||||
|
||||
@staticmethod
|
||||
def update_user_ipboard_info(username, password, user):
|
||||
if User.objects.filter(username=user.username).exists():
|
||||
authserviceinfo = AuthServicesInfoManager.__get_or_create(user)
|
||||
authserviceinfo.ipboard_username = username
|
||||
authserviceinfo.ipboard_password = password
|
||||
authserviceinfo.save(update_fields=['ipboard_username', 'ipboard_password'])
|
||||
|
||||
@staticmethod
|
||||
def update_is_blue(is_blue, user):
|
||||
if User.objects.filter(username=user.username).exists():
|
||||
|
||||
2
authentication/models.py
Normal file → Executable file
2
authentication/models.py
Normal file → Executable file
@@ -3,6 +3,8 @@ from django.contrib.auth.models import User
|
||||
|
||||
|
||||
class AuthServicesInfo(models.Model):
|
||||
ipboard_username = models.CharField(max_length=254, default="")
|
||||
ipboard_password = models.CharField(max_length=254, default="")
|
||||
forum_username = models.CharField(max_length=254, default="")
|
||||
forum_password = models.CharField(max_length=254, default="")
|
||||
jabber_username = models.CharField(max_length=254, default="")
|
||||
|
||||
Reference in New Issue
Block a user