Add certhash field to Mumble user

This commit is contained in:
Ben Cole 2020-05-22 14:04:35 +01:00
parent 8b84def494
commit 57d9ddc2c6
2 changed files with 27 additions and 2 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 2.2.11 on 2020-05-22 13:02
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mumble', '0009_set_mumble_dissplay_names'),
]
operations = [
migrations.AddField(
model_name='mumbleuser',
name='certhash',
field=models.CharField(blank=True, editable=False, help_text='Hash of Mumble client certificate as presented when user authenticates', max_length=254, null=True, verbose_name='Certificate Hash'),
),
]

View File

@ -66,11 +66,18 @@ class MumbleUser(AbstractServiceModel):
pwhash = models.CharField(max_length=80)
hashfn = models.CharField(max_length=20, default='sha1')
groups = models.TextField(blank=True, null=True)
certhash = models.CharField(
verbose_name="Certificate Hash",
max_length=254,
blank=True,
null=True,
editable=False,
help_text="Hash of Mumble client certificate as presented when user authenticates"
)
display_name = models.CharField(max_length=254, unique=True)
objects = MumbleManager()
display_name = models.CharField(max_length=254, unique=True)
def __str__(self):
return self.username