[Zope3-dev] ObjectCreatedEvent handlers and local permissions
Stephan Richter
srichter at cosmos.phy.tufts.edu
Sat Feb 12 12:18:59 EST 2005
On Saturday 12 February 2005 11:33, Garrett Smith wrote:
> I have a handler for an object created event and I need local
> permissions to apply, but since the newly created object has no parent,
> only the global permissions are used.
>
> This makes sense since the new object has no location and thus we can't
> use local permissions.
>
> Is the solution to wrap the new object in a location proxy for its use
> in a notify call:
>
> notify(ObjectCreatedEvent(LocationProxy(obj, parent, name)))
If a subscriber depends on the location, you should listen to
ObjectAddedEvent.
Regards,
Stephan
--
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
More information about the Zope3-dev
mailing list