Omit "edit" link unless user has perm, for Customer "people" subgrid
This commit is contained in:
parent
4dfc29768c
commit
7b5e2d17f3
|
@ -262,9 +262,11 @@ class CustomerView(MasterView):
|
||||||
'last_name': person.last_name,
|
'last_name': person.last_name,
|
||||||
'_action_url_view': self.request.route_url('people.view',
|
'_action_url_view': self.request.route_url('people.view',
|
||||||
uuid=person.uuid),
|
uuid=person.uuid),
|
||||||
'_action_url_edit': self.request.route_url('people.edit',
|
|
||||||
uuid=person.uuid),
|
|
||||||
}
|
}
|
||||||
|
if self.editable and self.request.has_perm('people.edit'):
|
||||||
|
data['_action_url_edit'] = self.request.route_url(
|
||||||
|
'people.edit',
|
||||||
|
uuid=person.uuid)
|
||||||
if self.people_detachable and self.has_perm('detach_person'):
|
if self.people_detachable and self.has_perm('detach_person'):
|
||||||
data['_action_url_detach'] = self.request.route_url(
|
data['_action_url_detach'] = self.request.route_url(
|
||||||
'customers.detach_person',
|
'customers.detach_person',
|
||||||
|
|
Loading…
Reference in a new issue