This repository has been archived on 2026-03-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
people/src/backend/mailbox_manager/enums.py
Sabrina Demagny d48a3ff677 (domains) add action required status on MailDomain
Create a new domain status to handle cases where
action is required from an external domain owner
for a domain to be fully functional.
2025-02-03 15:24:32 +01:00

35 lines
1015 B
Python

# pylint: disable=too-many-ancestors
"""
Application enums declaration
"""
from django.db import models
from django.utils.translation import gettext_lazy as _
class MailDomainRoleChoices(models.TextChoices):
"""Defines the possible roles a user can have to access to a mail domain."""
VIEWER = "viewer", _("Viewer")
ADMIN = "administrator", _("Administrator")
OWNER = "owner", _("Owner")
class MailDomainStatusChoices(models.TextChoices):
"""Defines the possible statuses in which a mail domain can be."""
PENDING = "pending", _("Pending")
ENABLED = "enabled", _("Enabled")
FAILED = "failed", _("Failed")
DISABLED = "disabled", _("Disabled")
ACTION_REQUIRED = "action_required", _("Action required")
class MailboxStatusChoices(models.TextChoices):
"""Lists the possible statuses in which a mailbox can be."""
PENDING = "pending", _("Pending")
ENABLED = "enabled", _("Enabled")
FAILED = "failed", _("Failed")
DISABLED = "disabled", _("Disabled")