From d502414ca000bf6f4a3f68a8e4822718d59dac97 Mon Sep 17 00:00:00 2001 From: Stephan Geulette Date: Mon, 3 Apr 2017 09:57:05 +0000 Subject: [PATCH] Added script to disable authentication plugins. Needed by copy-data script --- disable-authentication.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 disable-authentication.py diff --git a/disable-authentication.py b/disable-authentication.py new file mode 100644 index 0000000..4593a75 --- /dev/null +++ b/disable-authentication.py @@ -0,0 +1,11 @@ +from Products.ExternalMethod.ExternalMethod import manage_addExternalMethod +# we add the external method cputils_install +if not hasattr(app, 'cputils_install'): + manage_addExternalMethod(app, 'cputils_install', '', 'CPUtils.utils', 'install') +# we run this method +app.cputils_install(app) + +# disable authentication +app.cputils_change_authentication_plugins(activate='0', dochange='1') +import transaction +transaction.commit()