misc/migration/3.15.0_Any.py
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 18 Dec 2015 09:23:23 +0100
changeset 11033 63d860a14a17
parent 8483 4ba11607d84a
permissions -rw-r--r--
[schema] Use TZDatetime for creation_date and modification_date No work has been done for form fields/widgets since creation_date / modification_date are by default not editable through the default UI. One may want to add such feature at some point. Time will be displayed as UTC, let the end-application decide otherwise by customizing the tzdatetime printer if desired. Closes #4848923
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()