Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions massmail/site/mailingoutadmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ class MailingOutAdmin(CrmModelAdmin):

# -- ModelAdmin methods -- #

def has_add_permission(self, request):
return False # Completely disable adding Mailing Outs

def changelist_view(self, request, extra_context=None):
extra_context = extra_context or {}
now = timezone.localtime(timezone.now())
Expand Down
8 changes: 4 additions & 4 deletions tests/main_menu_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,9 +792,9 @@ def get_task_app_data(add_models: tuple = tuple(), prefix: str = '') -> dict:
{
'name': 'Mailing Outs',
'object_name': 'MailingOut',
'perms': get_perms(),
'perms': get_perms(add=False),
'admin_url': f'/en/{PREFIX}massmail/mailingout/',
'add_url': f'/en/{PREFIX}massmail/mailingout/add/',
'add_url': None,
'view_only': False
},
{
Expand Down Expand Up @@ -1149,9 +1149,9 @@ def get_task_app_data(add_models: tuple = tuple(), prefix: str = '') -> dict:
{
'name': 'Mailing Outs',
'object_name': 'MailingOut',
'perms': get_perms(),
'perms': get_perms(add=False),
'admin_url': f'/en/{ADMIN_PREFIX}massmail/mailingout/',
'add_url': f'/en/{ADMIN_PREFIX}massmail/mailingout/add/',
'add_url': None,
'view_only': False
},
{
Expand Down