[Zope3-dev] principal events for the event hub
Steve Alexander
steve@cat-box.net
Sat, 12 Apr 2003 12:38:22 +0200
> class IPrincipalEvent(IEvent):
> """Something happens to a principal"""
This should contain a principal object. You can't have a principal event
if you don't have a principal.
> class IPrincipalAuthorizedEvent(IPrincipalEvent):
> """Something happens to an authorized principal"""
> principal = Attribute("principal object")
> authSource = Attribute("the principal authorization source which has
> authorized the principal")
The authSource isn't required. The principal is always in the context of
its Authentication Service. So, the principal alone is enough.
> class IPrincipalAccessEvent(IPrincipalEvent):
> """A principal tries to access an object"""
> location = Attribute("location of the object")
I'd suggest 'path' rather than 'location' to affirm that this is a
string/unicode path.
--
Steve Alexander