Change group ownership to be another group

Instead of marking individual group members as owning that group
we designate another group whose members can manage this group.
The reference can be a self-reference, permitting a group to
control its own membership, or it can be to another group, so
the management is delegated away from the members.

With this pattern it may be common to see "foo" and "foo-owners"
or "foo-managers" be created, with the latter group having the
ownership status over the former group.

When a group is initially created it manages itself, so the user
who created the group can be made a member of it and may control
access to the group, even if they are not a site admin.

Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2008-12-30 10:03:24 -08:00
parent 0aca7299e4
commit bd523456fc
14 changed files with 232 additions and 91 deletions

View File

@@ -28,9 +28,6 @@ public interface AccountGroupMemberAccess extends
@Query("WHERE key.accountId = ?")
ResultSet<AccountGroupMember> byAccount(Account.Id id) throws OrmException;
@Query("WHERE key.accountId = ? AND owner = 'Y'")
ResultSet<AccountGroupMember> owned(Account.Id id) throws OrmException;
@Query("WHERE key.groupId = ?")
ResultSet<AccountGroupMember> byGroup(AccountGroup.Id id) throws OrmException;
}