In addition to the document view permission, the checkout detail view permission is now needed to view the list of checked out document.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-08-23 03:34:49 -04:00
parent f11eef7445
commit 4c3ca0de91
2 changed files with 8 additions and 1 deletions

View File

@@ -100,6 +100,9 @@
- Add new class based dashboard widget. This new widget supports
subclassing and is template based. All exising widgets have been
converted. ACL filtering was added to the widget results.
- In addition to the document view permission, the checkout detail
view permission is now needed to view the list of checked out
document.
3.0.3 (2018-08-17)
==================

View File

@@ -72,7 +72,11 @@ class CheckoutDocumentView(SingleObjectCreateView):
class CheckoutListView(DocumentListView):
def get_document_queryset(self):
return DocumentCheckout.objects.checked_out_documents()
return AccessControlList.objects.filter_by_access(
permission=permission_document_checkout_detail_view,
user=self.request.user,
queryset=DocumentCheckout.objects.checked_out_documents()
)
def get_extra_context(self):
context = super(CheckoutListView, self).get_extra_context()