TorbatYar/backend/services/communication/app/permissions/definitions.py
Mortezakoohjani e41ecfad4c Sync platform docs, infra, and module services with Accounting integration.
Include Loyalty/Communication/Sports Center backends and registry updates alongside production nginx and compose wiring.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-25 22:35:23 +03:30

65 lines
1.9 KiB
Python

"""Communication permission definitions."""
COMMUNICATION_VIEW = "communication.view"
COMMUNICATION_MANAGE = "communication.manage"
PROVIDERS_VIEW = "communication.providers.view"
PROVIDERS_MANAGE = "communication.providers.manage"
SENDERS_VIEW = "communication.senders.view"
SENDERS_MANAGE = "communication.senders.manage"
TEMPLATES_VIEW = "communication.templates.view"
TEMPLATES_MANAGE = "communication.templates.manage"
TEMPLATES_APPROVE = "communication.templates.approve"
CONTACTS_VIEW = "communication.contacts.view"
CONTACTS_MANAGE = "communication.contacts.manage"
SOURCES_VIEW = "communication.sources.view"
SOURCES_MANAGE = "communication.sources.manage"
MESSAGES_VIEW = "communication.messages.view"
MESSAGES_SEND = "communication.messages.send"
MESSAGES_CANCEL = "communication.messages.cancel"
QUEUE_VIEW = "communication.queue.view"
QUEUE_MANAGE = "communication.queue.manage"
OTP_REQUEST = "communication.otp.request"
OTP_VERIFY = "communication.otp.verify"
WEBHOOKS_MANAGE = "communication.webhooks.manage"
MONITORING_VIEW = "communication.monitoring.view"
ALL_PERMISSIONS = [
COMMUNICATION_VIEW,
COMMUNICATION_MANAGE,
PROVIDERS_VIEW,
PROVIDERS_MANAGE,
SENDERS_VIEW,
SENDERS_MANAGE,
TEMPLATES_VIEW,
TEMPLATES_MANAGE,
TEMPLATES_APPROVE,
CONTACTS_VIEW,
CONTACTS_MANAGE,
SOURCES_VIEW,
SOURCES_MANAGE,
MESSAGES_VIEW,
MESSAGES_SEND,
MESSAGES_CANCEL,
QUEUE_VIEW,
QUEUE_MANAGE,
OTP_REQUEST,
OTP_VERIFY,
WEBHOOKS_MANAGE,
MONITORING_VIEW,
]
PERMISSION_PREFIXES = [
"communication.",
"communication.providers.",
"communication.senders.",
"communication.templates.",
"communication.contacts.",
"communication.sources.",
"communication.messages.",
"communication.queue.",
"communication.otp.",
"communication.webhooks.",
"communication.monitoring.",
]