mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-12 05:50:16 +02:00
Added transition to bcrypt-sha256 hashing for mumble passwords. All new passwords will be hashed by bcrypt-sha256. The existing SHA-1 hashes will continue to work as a fallback for legacy password hashes.
16 lines
546 B
Python
16 lines
546 B
Python
from __future__ import unicode_literals
|
|
from django.utils.encoding import python_2_unicode_compatible
|
|
from django.db import models
|
|
|
|
|
|
@python_2_unicode_compatible
|
|
class MumbleUser(models.Model):
|
|
user = models.OneToOneField('auth.User', related_name='mumble', null=True)
|
|
username = models.CharField(max_length=254, unique=True)
|
|
pwhash = models.CharField(max_length=80)
|
|
hashfn = models.CharField(max_length=20, default='sha1')
|
|
groups = models.TextField(blank=True, null=True)
|
|
|
|
def __str__(self):
|
|
return self.username
|