Bric::App::Callback::Profile - The Bricolage profile callback base class
use base 'Bric::App::Callback::Profile';
This is the base class from which all Bricolage profile callback classes inherit. It provides a number of base and utility methods that are useful to the profile classes, and that handle common functionality between the classes.
Bric::App::Callback::Profile overrids the parent new() constructor so handle a number of tasks common to all profile callback classes. These include:
Constructing the object on which the callback methods will be operating.
Setting the class of object that the callback will be executing against.
Checking permissions on the object to be operated on.
my $obj = $cb->obj;
The object on which operations are to be performed by callback methods.
my $type = $cb->type;
The type of object on which operations will be performed. This is generally a string such as "user" or "story".
my $class = $cb->class;
The class of object on which operations will be performed.
unless ($cb->has_perms)
die "Oh-oh!";
}
Returns true if the current user has permission to the object to be operated on. The required permission is CREATE for new objects and EDIT for existing objects.
$cb->manage_grps;
This method manages group memberships for the object. Since many profiles have group membership association built in to the UI, this method can handle updating the memberships for any and all types of objects with profiles.
Scott Lanning <lannings@who.int>
The Bricolage base callback class, from which Bric::App::Callback::Profile inherits.
The user profile callback class, which inherits from Bric::App::Callback::Profile.
Copyright (c) 2003-2004 World Health Organization and Kineticode, Inc. See Bric::License for complete license terms and conditions.