mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Generic list only displays edit button if user has perm
This commit is contained in:
@@ -218,6 +218,7 @@ class SupplierList(GenericListView):
|
||||
context = super(SupplierList, self).get_context_data(**kwargs)
|
||||
context['create'] = 'supplier_create'
|
||||
context['edit'] = 'supplier_update'
|
||||
context['can_edit'] = self.request.user.has_perm('assets.change_supplier')
|
||||
context['detail'] = 'supplier_detail'
|
||||
if self.request.is_ajax():
|
||||
context['override'] = "base_ajax.html"
|
||||
|
||||
Reference in New Issue
Block a user