Added IPBoard support

This commit is contained in:
Raynaldo Rivera
2014-11-17 08:40:25 -07:00
parent c131798e24
commit 1ed41ae043
27 changed files with 1338 additions and 530 deletions

8
authentication/managers.py Normal file → Executable file
View 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
View 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="")