misc/migration/3.15.0_Any.py
changeset 8188 1867e252e487
parent 8158 2ee254e74382
child 8251 df46bf02b107
--- a/misc/migration/3.15.0_Any.py	Thu Feb 02 14:30:07 2012 +0100
+++ b/misc/migration/3.15.0_Any.py	Tue Jan 31 21:43:24 2012 +0100
@@ -1,1 +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', 'ldap')
+    protocol = config.pop('protocol', 'ldap')
+    source.set_attributes(url='%s://%s' % (protocol, host))
+    source.update_config(skip_unknown=True, **config)
+
+commit()