cubicweb/misc/migration/3.15.0_Any.py
author Denis Laxalde <denis.laxalde@logilab.fr>
Sat, 16 Jan 2016 13:48:51 +0100
changeset 11057 0b59724cb3f2
parent 8483 misc/migration/3.15.0_Any.py@4ba11607d84a
child 12133 8743c3bda480
permissions -rw-r--r--
Reorganize source tree to have a "cubicweb" top-level package Basically: mkdir cubicweb hg mv *.py -X setup.py cubicweb hg mv dataimport devtools entities etwist ext hooks i18n misc schemas server skeleton sobjects test web wsgi cubicweb Other changes: * adjust path to cubicweb-ctl in devtools tests * update setup.py to avoid importing __pkginfo__ (exec it instead), replace os.path.walk by os.walk and prepend `modname` here and there * update tox.ini to account for new test locations * update doc/conf.py so that it still finds __pkginfo__.py and CWDIR in doc/Makefile
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8158
2ee254e74382 [schema] restrictive email address read permission. Closes #2148141
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     1
sync_schema_props_perms('EmailAddress')
8188
1867e252e487 [repository] ldap-feed source. Closes #2086984
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8158
diff changeset
     2
1867e252e487 [repository] ldap-feed source. Closes #2086984
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8158
diff changeset
     3
for source in rql('CWSource X WHERE X type "ldapuser"').entities():
1867e252e487 [repository] ldap-feed source. Closes #2086984
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8158
diff changeset
     4
    config = source.dictconfig
8251
df46bf02b107 [ldap migration] use unicode strings
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
     5
    host = config.pop('host', u'ldap')
df46bf02b107 [ldap migration] use unicode strings
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
     6
    protocol = config.pop('protocol', u'ldap')
8483
4ba11607d84a [entity api] unify set_attributes / set_relations into a cw_set method. Closes #2423719
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8251
diff changeset
     7
    source.cw_set(url=u'%s://%s' % (protocol, host))
8188
1867e252e487 [repository] ldap-feed source. Closes #2086984
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8158
diff changeset
     8
    source.update_config(skip_unknown=True, **config)
1867e252e487 [repository] ldap-feed source. Closes #2086984
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8158
diff changeset
     9
1867e252e487 [repository] ldap-feed source. Closes #2086984
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8158
diff changeset
    10
commit()