1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #29419 -- Allowed permissioning of admin actions.

This commit is contained in:
Carlton Gibson
2018-06-18 21:07:29 +02:00
committed by Tim Graham
parent 6dd4edb1b4
commit 958c7b301e
9 changed files with 192 additions and 17 deletions

View File

@@ -429,8 +429,11 @@ class AdminActionsPermissionTests(TestCase):
ACTION_CHECKBOX_NAME: [self.s1.pk],
'action': 'delete_selected',
}
response = self.client.post(reverse('admin:admin_views_subscriber_changelist'), action_data)
self.assertEqual(response.status_code, 403)
url = reverse('admin:admin_views_subscriber_changelist')
response = self.client.post(url, action_data)
self.assertRedirects(response, url, fetch_redirect_response=False)
response = self.client.get(response.url)
self.assertContains(response, 'No action selected.')
def test_model_admin_no_delete_permission_externalsubscriber(self):
"""