--- a/src/pyams_content/shared/common/zmi/security.py Thu May 03 11:05:45 2018 +0200
+++ b/src/pyams_content/shared/common/zmi/security.py Thu May 03 11:29:56 2018 +0200
@@ -209,8 +209,12 @@
manager_restrictions.set_restrictions(self.principal_id, restrictions)
return restrictions
- def update(self):
- super(SharedToolManagerRestrictionsEditForm, self).update()
+ def updateWidgets(self, prefix=None):
+ super(SharedToolManagerRestrictionsEditForm, self).updateWidgets(prefix)
+ self.widgets['principal_id'].value = self.principal
+ self.widgets['principal_id'].mode = HIDDEN_MODE
+
+ def updateGroups(self):
names = getFieldNamesInOrder(self.interface)
self.add_group(NamedWidgetsGroup(self, 'restricted_access', self.widgets, names,
legend=_("Apply contents restrictions"),
@@ -221,11 +225,7 @@
switch=True,
checkbox_switch=True,
checkbox_field=self.interface['restricted_contents']))
-
- def updateWidgets(self, prefix=None):
- super(SharedToolManagerRestrictionsEditForm, self).updateWidgets(prefix)
- self.widgets['principal_id'].value = self.principal
- self.widgets['principal_id'].mode = HIDDEN_MODE
+ super(SharedToolManagerRestrictionsEditForm, self).updateGroups()
@view_config(name='manager-restrictions.json', context=IBaseSharedTool, request_type=IPyAMSLayer,