--- a/src/pyams_skin/table.py Tue Apr 18 11:38:32 2017 +0200
+++ b/src/pyams_skin/table.py Tue Apr 18 11:40:10 2017 +0200
@@ -192,7 +192,7 @@
permission = None
def renderCell(self, item):
- if self.permission and not self.request.has_permission(self.permission, context=item):
+ if not self.has_permission(item):
return ''
if self.checker:
if callable(self.checker):
@@ -212,6 +212,11 @@
modal='data-toggle="modal"' if self.modal_target else '',
icon=self.get_icon(item))
+ def has_permission(self, item):
+ if not self.permission:
+ return True
+ return self.request.has_permission(self.permission, context=item)
+
def get_url(self, item):
return absolute_url(item, self.request, self.url)