'User can see the "Pages" section the admin
if he has change permissions on the Page model
and he has global change permissions.'

def test_pages_in_admin_index(self):

    endpoint = admin_reverse('app_list', args=['cms'])
    staff_user = self.get_staff_user_with_no_permissions()
    self.add_permission(staff_user, 'change_page')
    self.add_global_permission(staff_user, can_change=True)
    with self.login_user_context(staff_user):
        response = self.client.get(endpoint)
        self.assertEqual(response.status_code, 200)
        self.assertContains(response, '<a    href="/en/admin/cms/page/">Pages</a>', html=True)
    endpoint = self.get_admin_url(Page, 'changelist')
    with self.login_user_context(staff_user):
        response = self.client.get(endpoint)
        self.assertEqual(response.status_code, 200)
