Ignore:
Timestamp:
21 May 2011, 01:31:03 (13 years ago)
Author:
uli
Message:

Add local roles dicts for user accounts. That seems to
need pretty much machinery, but seems also to work. So,
why not?

We have a new event type, that should be fired when
a local role is set or unset somewhere.

We have also two new event subscribers, one listening
to the new event (and then updates the user account
local roles listings), and another one listening to
IObjectRemoved events.

The latter is the trick to keep the local role listings
in user accounts more or less up-to-date. Without it
these lists would grow and grow, not noticing that
the objects they refer to, have gone already.

We now must think about subscribing to other events.
What happens, when an object is moved or copied.
Will the local roles then be copied as well? And would
that fact be reflected in user accounts?

Beside this we have to find all places in sources
where local roles are set/unset and trigger the new
LocalRoleSetEvent? defined in users.py.

Samples for the whole new stuff are in authentication.txt.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/interfaces.py

    r6174 r6180  
    266266    """
    267267
     268class ILocalRoleSetEvent(IObjectEvent):
     269    """A local role was granted/revoked for a principal on an object.
     270    """
     271    role_id = Attribute(
     272        "The role id that was set.")
     273    principal_id = Attribute(
     274        "The principal id for which the role was granted/revoked.")
     275    granted = Attribute(
     276        "Boolean. If false, then the role was revoked.")
     277
    268278class IQueryResultItem(Interface):
    269279    """An item in a search result.
Note: See TracChangeset for help on using the changeset viewer.