grouper-dev - High Level Membership Hooks
Subject: Grouper Developers Forum
List archive
- From: Shilen Patel <>
- To: Grouper Dev <>
- Subject: High Level Membership Hooks
- Date: Wed, 29 Jul 2009 15:46:26 -0400
Hi folks,
I'm curious if anybody is using the high level membership hooks. These include membershipPreAddMember(), membershipPreRemoveMember(), membershipPostAddMember(), membershipPostRemoveMember(), membershipPostCommitAddMember(), membershipPostCommitRemoveMember(). If so, how are you using them?
These hooks fire before and after the high level addMember(), grantPriv(), deleteMember(), and revokePriv() methods are called. These hooks are not called when the low level effective and composite memberships are added and removed. There's a separate hook for that.
So it seems like having these high level membership hooks are useful, but there's a feature of these hooks that I'm wondering would be okay to remove. The hooks allow you to know all the low level changes that would result from the high level change. So for instance, if you add a member to a group and you write a membership hook for membershipPreAddMember(), then before the member is added, your implementation of membershipPreAddMember() will be called and will have access to all the effective and composite memberships that would result from the direct membership add. If we remove that feature, then with the membership changes for 1.5, it would make things a bit more straightforward. And even if the feature is still needed, Chris seems to think there's another way to get the same data, which is to essentially have low level and high level hooks and use threadlocal to determine which high level membership change a low level membership change was caused by.
So does anyone have any objections if I keep the high level hook but remove the precomputation of low level memberships that is available to the high level hook? Does this even make sense? :)
Thanks!
-- Shilen
- High Level Membership Hooks, Shilen Patel, 07/29/2009
Archive powered by MHonArc 2.6.16.