README
author julien tayon <julien.tayon@logilab.fr>
Thu, 16 May 2019 14:26:38 +0200
branch3.26
changeset 12618 3f125fdbcd70
parent 12375 e7221f2123e6
child 12532 38004d09d178
permissions -rw-r--r--
[ldapfeed] FIX: Unique Key violation when synchronizing with LDAPfeed What was happening ================== The bug appears when ldapfeed tries to insert a user while another user exists exists with a different source. Simple use case to reproduce: - create a local user in cubicweb (source=system) - sync with ldap - ldapfeed will stop complaining user already exists. Without next patch the test MUST fail with message: cubicweb/server/sources/native.py:714: UniqueTogetherError The ldapfeed is thus stopped ignoring any further ldap entries. The proposal ============ Prior to this patch, the insertion was trying to create all CWUser with the computed login from eeimporter.extid2eid (method process of DataFeedLDAPAdapter). When a CWUser existed with a different cw_source ("system" for user created with cubicweb for instance), it created a conflict. To avoid collisions, in the extentities_generator method a bypass was added at the insertion layer. Prior to insertion the absence of the computed login is checked on a list of all existing login from a different source. If collision is detected, we skip the ldap record. By short circuiting at the CWUser entity insertion level we also avoid to treat CWGroup and EmailAddress related to this user. Hence ensuring a behaviour that will not break existing instances. (conservative approach: faced with ambiguity better do nothing than guess). An error message is added stating explicitly the conflict.

CubicWeb semantic web framework
===============================

CubicWeb is a entities / relations based knowledge management system
developped at Logilab.

This package contains:

- a repository server
- a RQL command line client to the repository
- an adaptative modpython interface to the server
- a bunch of other management tools

Install
-------

More details at https://cubicweb.readthedocs.io/en/3.26/book/admin/setup

Getting started
---------------

Execute::

 apt-get install cubicweb cubicweb-dev cubicweb-blog
 cubicweb-ctl create blog myblog
 cubicweb-ctl start -D myblog
 sensible-browser http://localhost:8080/

Details at https://cubicweb.readthedocs.io/en/3.26/tutorials/base/blog-in-five-minutes

You can also look at the latest builds on Logilab's jenkins:
https://jenkins.logilab.org/

Documentation
-------------

Look in the doc/ subdirectory or read https://cubicweb.readthedocs.io/en/3.26/


CubicWeb includes the Entypo pictograms by Daniel Bruce — http://www.entypo.com

Contributing
------------

Patches should be submitted by email at the cubicweb-devel@lists.cubicweb.org
mailing list in order to get reviewed by project integrators or any community
member.
The simplest way of send patches is to use the ``hg email`` command available
through the *patchbomb* extension of Mercurial. Preferably, patches should be
*in the message body* of emails. When submitting a revised version of a patch
series, a prefix indicating the iteration number ``<n>`` of the series should
be added to email subject prefixes; this can be achieved by specifying a
``--flag v<n>`` option to ``hg email`` command. If needed you can also use the
--in-reply-to option.

Examples:

    hg email --to cubicweb-devel@lists.cubicweb.org --intro -r <start>::<end>
    hg email --flag V2 --to cubicweb-devel@lists.cubicweb.org -r <start>::<end>

If you have any questions you can also come on Logilab's public XMPP room using
a XMPP client: public@conference.jabber.logilab.org

Mailing list: https://lists.cubicweb.org/mailman/listinfo/cubicweb-devel
Patchbomb extension: https://www.mercurial-scm.org/wiki/PatchbombExtension
Good practice on sending email patches: https://www.mercurial-scm.org/wiki/ContributingChanges#Emailing_patches