Commit 65ec8b7f authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5: also check PAS plugins which are not supposed to be activated

parent 2e1d3559
...@@ -9,9 +9,12 @@ slapos_plugin_dict = { ...@@ -9,9 +9,12 @@ slapos_plugin_dict = {
'ERP5 Facebook Extraction Plugin' 'ERP5 Facebook Extraction Plugin'
], ],
'IGroupsPlugin': [ 'IGroupsPlugin': [
'ZODB Group Manager',
'SlapOS Shadow Authentication Plugin', 'SlapOS Shadow Authentication Plugin',
'ERP5 Group Manager'
], ],
'IUserEnumerationPlugin': [ 'IUserEnumerationPlugin': [
'ZODB User Manager',
'SlapOS Shadow Authentication Plugin', 'SlapOS Shadow Authentication Plugin',
'ERP5 Login User Manager' 'ERP5 Login User Manager'
] ]
...@@ -37,6 +40,18 @@ def mergePASDictDifference(portal, d, fixit): ...@@ -37,6 +40,18 @@ def mergePASDictDifference(portal, d, fixit):
error += ' Fixed.' error += ' Fixed.'
error_list.append(error) error_list.append(error)
for activated_plugin in meta_type_list:
if activated_plugin not in active_list:
error = 'Plugin %s must not be activated %s.' % (plugin, activated_plugin)
if fixit:
existing = [q for q in portal.acl_users.objectValues() if q.meta_type == activated_plugin]
if len(existing) == 0:
error_list.append('%s not found' % activated_plugin)
else:
plugins.deactivatePlugin(plugin_info['interface'], existing[0].getId())
error += ' Fixed.'
error_list.append(error)
return error_list return error_list
pas_difference = mergePASDictDifference(portal, slapos_plugin_dict, fixit) pas_difference = mergePASDictDifference(portal, slapos_plugin_dict, fixit)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment