Merge pull request #29405 from edx/ork/MICROBA_1573-allow_bulk_email_template_delete

feat: allow bulk email templates to be deleted
This commit is contained in:
Olivia Ruiz-Knott
2021-11-23 13:41:18 -05:00
committed by GitHub

View File

@@ -58,19 +58,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."""