--- a/src/pyams_catalog/zmi/catalog.py Tue Apr 10 16:22:40 2018 +0200
+++ b/src/pyams_catalog/zmi/catalog.py Wed Apr 11 12:12:30 2018 +0200
@@ -202,6 +202,13 @@
return super(CatalogIndexTrashColumn, self).has_permission(self.context)
+@view_config(name='delete-element.json', context=ICatalog, request_type=IPyAMSLayer,
+ permission=MANAGE_SYSTEM_PERMISSION, renderer='json', xhr=True)
+def delete_catalog_index(request):
+ """Delete index from catalog"""
+ return delete_container_element(request, ignore_permission=True)
+
+
@adapter_config(context=(ICatalog, IAdminLayer, CatalogIndexesTable), provides=IValues)
class CatalogIndexesValuesAdapter(ContextRequestViewAdapter):
"""Catalog indexes values adapter"""
@@ -217,10 +224,3 @@
"""Catalog indexes viewlet"""
table_class = CatalogIndexesTable
-
-
-@view_config(name='delete-element.json', context=ICatalog, request_type=IPyAMSLayer,
- permission=MANAGE_SYSTEM_PERMISSION, renderer='json', xhr=True)
-def delete_catalog_index(request):
- """Delete index from catalog"""
- return delete_container_element(request)