From 6c65598a4dda17e17a3927d970b4093531270379 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Tue, 20 Oct 2015 20:05:40 -0400 Subject: [PATCH] Remove permission check from the multiple document action links, an user may not have permissions for some items but maybe does for others, we don't know as scanning the entire queryset for ACLs is costly, so we leave the links enable, permission check is done by the view. --- mayan/apps/documents/links.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/mayan/apps/documents/links.py b/mayan/apps/documents/links.py index 56f62fd888..c24f34a9e3 100644 --- a/mayan/apps/documents/links.py +++ b/mayan/apps/documents/links.py @@ -100,28 +100,26 @@ link_document_multiple_clear_transformations = Link( view='documents:document_multiple_clear_transformations' ) link_document_multiple_trash = Link( - permissions=(permission_document_trash,), tags='dangerous', - text=_('Move to trash'), view='documents:document_multiple_trash' + tags='dangerous', text=_('Move to trash'), + view='documents:document_multiple_trash' ) link_document_multiple_delete = Link( - permissions=(permission_document_delete,), tags='dangerous', - text=_('Delete'), view='documents:document_multiple_delete' + tags='dangerous', text=_('Delete'), + view='documents:document_multiple_delete' ) link_document_multiple_document_type_edit = Link( - permissions=(permission_document_properties_edit,), text=_('Change type'), + text=_('Change type'), view='documents:document_multiple_document_type_edit' ) link_document_multiple_download = Link( - permissions=(permission_document_download,), text=_('Download'), - view='documents:document_multiple_download' + text=_('Download'), view='documents:document_multiple_download' ) link_document_multiple_update_page_count = Link( - permissions=(permission_document_tools,), text=_('Recalculate page count'), - view='documents:document_multiple_update_page_count' + text=_('Recalculate page count'), + view='documents:document_multiple_update_page_count' ) link_document_multiple_restore = Link( - permissions=(permission_document_restore,), text=_('Restore'), - view='documents:document_multiple_restore' + text=_('Restore'), view='documents:document_multiple_restore' ) link_document_version_download = Link( args='object.pk', permissions=(permission_document_download,),