Switch permission check
authorThierry Florac <thierry.florac@onf.fr>
Fri, 06 Apr 2018 08:18:40 +0200
changeset 299 3a853ab20abb
parent 298 399c586fc1a5
child 300 9da45cf2de9d
Switch permission check
src/pyams_skin/table.py
--- a/src/pyams_skin/table.py	Thu Apr 05 22:39:34 2018 +0200
+++ b/src/pyams_skin/table.py	Fri Apr 06 08:18:40 2018 +0200
@@ -325,7 +325,7 @@
 
     def renderCell(self, item):
         permission = self.permission
-        if permission and self.request.has_permission(permission, context=item):
+        if permission and not self.request.has_permission(permission, context=item):
             return self.get_icon(item)
         else:
             return super(VisibilitySwitcherColumn, self).renderCell(item)