let mailboxes reference os users
- refer to osuser instead of own home, uid and gid entries in mailboxes - add data and schema migrations
This commit is contained in:
parent
3de357d394
commit
f085dab017
3 changed files with 265 additions and 3 deletions
|
@ -5,6 +5,8 @@ from django.utils.translation import ugettext as _
|
|||
from passlib.hash import sha512_crypt
|
||||
from model_utils.models import TimeStampedModel
|
||||
|
||||
from osusers.models import User as OsUser
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class MailDomain(TimeStampedModel, models.Model):
|
||||
|
@ -31,11 +33,9 @@ class ActivateAbleMixin(models.Model):
|
|||
|
||||
@python_2_unicode_compatible
|
||||
class Mailbox(ActivateAbleMixin, TimeStampedModel, models.Model):
|
||||
osuser = models.ForeignKey(OsUser)
|
||||
username = models.CharField(max_length=128, unique=True)
|
||||
password = models.CharField(max_length=255)
|
||||
home = models.CharField(max_length=255)
|
||||
uid = models.PositiveSmallIntegerField()
|
||||
gid = models.PositiveSmallIntegerField()
|
||||
|
||||
class Meta:
|
||||
verbose_name = _('Mailbox')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue