🗃️(domains) add "secret" field to domains
add a "secret" field to domain model. This secret will be used as password in mail provisioning API.
This commit is contained in:
committed by
Marie
parent
8963f0bb3d
commit
2c82f38c59
@@ -27,6 +27,7 @@ class MailDomainFactory(factory.django.DjangoModelFactory):
|
|||||||
|
|
||||||
name = factory.Faker("domain_name")
|
name = factory.Faker("domain_name")
|
||||||
slug = factory.LazyAttribute(lambda o: slugify(o.name))
|
slug = factory.LazyAttribute(lambda o: slugify(o.name))
|
||||||
|
secret = factory.Faker("password")
|
||||||
|
|
||||||
@factory.post_generation
|
@factory.post_generation
|
||||||
def users(self, create, extracted, **kwargs):
|
def users(self, create, extracted, **kwargs):
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 5.0.6 on 2024-07-01 16:22
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('mailbox_manager', '0010_alter_mailbox_first_name_alter_mailbox_last_name'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='maildomain',
|
||||||
|
name='secret',
|
||||||
|
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='secret'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -26,6 +26,7 @@ class MailDomain(BaseModel):
|
|||||||
default=MailDomainStatusChoices.PENDING,
|
default=MailDomainStatusChoices.PENDING,
|
||||||
choices=MailDomainStatusChoices.choices,
|
choices=MailDomainStatusChoices.choices,
|
||||||
)
|
)
|
||||||
|
secret = models.CharField(_("secret"), max_length=255, null=True, blank=True)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
db_table = "people_mail_domain"
|
db_table = "people_mail_domain"
|
||||||
|
|||||||
Reference in New Issue
Block a user