cubicweb/misc/migration/3.15.0_Any.py
changeset 11057 0b59724cb3f2
parent 8483 4ba11607d84a
child 12133 8743c3bda480
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cubicweb/misc/migration/3.15.0_Any.py	Sat Jan 16 13:48:51 2016 +0100
@@ -0,0 +1,10 @@
+sync_schema_props_perms('EmailAddress')
+
+for source in rql('CWSource X WHERE X type "ldapuser"').entities():
+    config = source.dictconfig
+    host = config.pop('host', u'ldap')
+    protocol = config.pop('protocol', u'ldap')
+    source.cw_set(url=u'%s://%s' % (protocol, host))
+    source.update_config(skip_unknown=True, **config)
+
+commit()