Gadgets::Group.pm
Created by: Douglas Hunter
Permissions: read[all users] edit[all users] reply[all users]

NAME

Gadgets::Group - Group creation and management

METHODS

my $group = Gadgets::Group->new_group ( group_name => "My Group" )

Creates a new group of "group_name". Dies if a group of that name
already exists. Returns the new GadgetsGroup doc object upon success.

my $group = Gadgets::Group->get_by_name ( "My Group" )

Returns either a GadgetsGroup document or undef.

my $group = Gadgets::Group->get_by_id ( group_id )

Returns either a GadgetsGroup document or undef.

my $group = Gadgets::Group->get_by_key ( group_key )

Returns either a GadgetsGroup document or undef.

my @groups = Gadgets::Group->get_memberships_recursively( user_key | group_key ... )

takes one or more GadgetsUser or GadgetsGroup doc_keys, returns the
inclusive list of group memberships. Usually used to get the list of
groups a user belongs to, like so:

  my @groups = Gadgets::Group->get_memberships_recursively
                                 ( $user->doc_key );