feat: allow bulk email templates to be deleted
There are some old bulk email templates in the database that we don’t need anymore. We need to make this change in order to delete them. After removing the templates we want to remove, we’ll leave in the ability to delete. [MICROBA-1573]
This commit is contained in:
@@ -57,19 +57,11 @@ unsupported tags will cause email sending to fail.
|
||||
'''
|
||||
}),
|
||||
)
|
||||
# Turn off the action bar (we have no bulk actions)
|
||||
actions = None
|
||||
|
||||
def has_add_permission(self, request):
|
||||
"""Enable the ability to add new templates, as we want to be able to define multiple templates."""
|
||||
return True
|
||||
|
||||
def has_delete_permission(self, request, obj=None):
|
||||
"""
|
||||
Disables the ability to remove existing templates, as we'd like to make sure we don't have dangling references.
|
||||
"""
|
||||
return False
|
||||
|
||||
|
||||
class CourseAuthorizationAdmin(admin.ModelAdmin):
|
||||
"""Admin for enabling email on a course-by-course basis."""
|
||||
|
||||
Reference in New Issue
Block a user