def remove_admin_access_permissions(apps, schema_editor):
    """Reverse the above additions of permissions."""
    ContentType = apps.get_model('contenttypes.ContentType')
    Permission = apps.get_model('auth.Permission')
    wagtailadmin_content_type = ContentType.objects.get(app_label=
        'wagtailadmin', model='admin')
    Permission.objects.filter(content_type=wagtailadmin_content_type,
        codename='access_admin').delete()
