On Thu, Jan 27, 2011 at 10:29 PM, Felix Meschberger <[email protected]> wrote: > Hi, > > Vidar is right. In Jackrabbit 1 users used to be stored in the security > workspace. In Jackrabbit 2 this has been made a bit more pluggable, but > IIRC users are still stored in the security workspace. > > IIRC the session to access the security workspace is encapsulated in the > UserManager.
Regardless of where users are actually stored by Jackrabbit, perhaps it would make sense to have CreateUserServlet fire an OSGi event (like org/apache/sling/api/resource/Resource/ADDED) when adding a user? The same would obviously apply to the other servlets under o.a.s.jackrabbit.usermanager.impl.post. > Am Donnerstag, den 27.01.2011, 19:05 +0000 schrieb Vidar Ramdal: >> >> On Thu, Jan 27, 2011 at 9:56 AM, Markus Joschko >> >> <[email protected]> wrote: >> >>> I try to implement an audit mechanism and part of it is to track the >> >>> changes that happen in the user and group sections. >> >>> However when I use the REST interface of the usermanager, I don't >> >>> receive any events when a user is added below /system/userManager/user >> >>> >> >>> When I add a node there "by hand" I get the notifications >> >>> >> >>> Any obvious reason for that? >> >> > On Thu, Jan 27, 2011 at 10:06 AM, Vidar Ramdal <[email protected]> wrote: >> >> Just guessing, but I think the user nodes are added to the 'security' >> >> workspace, but the event listeners are only listening to events from >> >> the 'default' workspace. >> >> >> >> You could try registering a JCR event listener for the security >> >> workspace by repository.login([credentials], >> >> "security").getObservationManager().addEventListener(...); >> >> On Thu, Jan 27, 2011 at 4:59 PM, Markus Joschko >> <[email protected]> wrote: >> > Hi Vidar, >> > that also doesn't work. >> > Checking the CreateUserServlet I see that it is using the default >> > workspace. >> >> Hmm, yes, the CreateUserServlet uses a session for the default >> workspace to get the UserManager, which in turn is used to create the >> user. >> But I'm pretty sure that Jackrabbit internally stores users in the >> security workspace. >> >> Maybe you could post the code of your EventListener, and of >> ObservationManager.addEventListener call? >> >> > > > -- Vidar S. Ramdal <[email protected]> - http://www.idium.no Sommerrogata 13-15, N-0255 Oslo, Norway + 47 22 00 84 00 Quando omni flunkus moritatus!
