src/pyams_content/shared/common/zmi/security.py
changeset 286 1a27b43375d6
parent 277 9649f8ce3b1c
child 527 5dd1aa8bedd9
equal deleted inserted replaced
285:e10f82e4874e 286:1a27b43375d6
   113     weight = 45
   113     weight = 45
   114     cssClasses = {'td': 'center'}
   114     cssClasses = {'td': 'center'}
   115 
   115 
   116     def getValue(self, obj):
   116     def getValue(self, obj):
   117         restrictions = IManagerRestrictions(self.context).get_restrictions(obj)
   117         restrictions = IManagerRestrictions(self.context).get_restrictions(obj)
   118         if restrictions.restricted_contents:
   118         if (restrictions is not None) and restrictions.restricted_contents:
   119             return '<i class="fa fa-fw fa-check"></i>'
   119             return '<i class="fa fa-fw fa-check"></i>'
   120         else:
   120         else:
   121             return '--'
   121             return '--'
   122 
   122 
   123 
   123 
   130     weight = 50
   130     weight = 50
   131     cssClasses = {'td': 'center'}
   131     cssClasses = {'td': 'center'}
   132 
   132 
   133     def getValue(self, obj):
   133     def getValue(self, obj):
   134         restrictions = IManagerRestrictions(self.context).get_restrictions(obj)
   134         restrictions = IManagerRestrictions(self.context).get_restrictions(obj)
   135         if restrictions.restricted_contents and restrictions.owners:
   135         if (restrictions is not None) and restrictions.restricted_contents and restrictions.owners:
   136             return '<i class="fa fa-fw fa-check"></i>'
   136             return '<i class="fa fa-fw fa-check"></i>'
   137         else:
   137         else:
   138             return '--'
   138             return '--'
   139 
   139 
   140 
   140