Ticket #13576: django_contrib_admin_actions-fix-perms-check-bug.diff
File django_contrib_admin_actions-fix-perms-check-bug.diff, 662 bytes (added by , 14 years ago) |
---|
-
actions.py
old new def delete_selected(modeladmin, request, 27 27 app_label = opts.app_label 28 28 29 29 # Check that the user has delete permission for the actual model 30 if not modeladmin.has_delete_permission(request): 31 raise PermissionDenied 30 for obj in queryset: 31 if not modeladmin.has_delete_permission(request, obj): 32 raise PermissionDenied 32 33 33 34 # Populate deletable_objects, a data structure of all related objects that 34 35 # will also be deleted.