The index rebuild permission can now be set as part of the index ACL for each individual index. Add cascade permission check to the index rebuild tool link. The index rebuild tool now responds with the number of indexes queued to rebuild instead of a static acknowledment.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-08-22 00:36:19 -04:00
parent 76895db846
commit 5210fdc9d8
5 changed files with 41 additions and 7 deletions

View File

@@ -62,11 +62,13 @@ link_index_setup_document_types = Link(
view='indexing:index_setup_document_types',
)
link_rebuild_index_instances = Link(
icon_class=icon_rebuild_index_instances,
condition=get_cascade_condition(
app_label='document_indexing', model_name='Index',
object_permission=permission_document_indexing_rebuild,
), icon_class=icon_rebuild_index_instances,
description=_(
'Deletes and creates from scratch all the document indexes.'
),
permissions=(permission_document_indexing_rebuild,),
text=_('Rebuild indexes'), view='indexing:rebuild_index_instances'
)
link_template_node_create = Link(