[Cubicweb] Correct use of the 'person' cube
stephane.bugat at free.fr
Wed Jul 11 17:08:34 CEST 2012
Good idea, Nicolas. As soon as I have made several tests I send it to you. Does it have to be consistent with the terminology declared in http://xmlns.com/foaf/spec/#term_OnlineAccount ? (to be honest I wasn't aware of such specifications and used another terminology like 'Person', 'Profile', 'PersonalBlog' and so on...).
>> After browsing the section §220.127.116.11 of cw documentation, it seems that indicating a composite='subject' relation property allows to automatically delete the CWUser once the Person is deleted... Can you confirm also?
----- Mail original -----
De: "Nicolas Chauvat" <nicolas.chauvat at logilab.fr>
À: "Sylvain Thénault" <sylvain.thenault at logilab.fr>
Cc: "Aurélien Campéas" <aurelien.campeas at logilab.fr>, cubicweb at lists.cubicweb.org, "Stéphane Bugat" <stephane.bugat at free.fr>
Envoyé: Mercredi 11 Juillet 2012 16:15:32
Objet: Re: [Cubicweb] Correct use of the 'person' cube
On Wed, Jul 11, 2012 at 11:56:29AM +0200, Sylvain Thénault wrote:
> > >A solution is to define a hook for the creation of each CWUser
> > >that automatically creates the corresponding Person and
> > >predefines its attributes with the corresponding values of the
> > >CWUser attributes (using a 'after_add_entity' event).
And hooks that update Person when CWUser is updated and update CWUser
when Person is updated and (maybe) delete Person when CWUser is
> Though you'll need more burden to keep them in sync. For your information,
> we've been wishing to split current CWUser into CWAccount + Person or similar
> for a while now, but never found the time to do so.
+1. See http://xmlns.com/foaf/spec/#term_OnlineAccount
Stéphane, we would be interested in patches that implement the above
CWUser/Person link. It could be added to the person cube maybe.
logilab.fr - services en informatique scientifique et gestion de connaissances
More information about the Cubicweb