Name

Bric::App::Callback::Profile - The Bricolage profile callback base class

Synopsis

use base 'Bric::App::Callback::Profile';

Description

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.

Class Interface

Constructors

new

Bric::App::Callback::Profile overrids the parent new() constructor so handle a number of tasks common to all profile callback classes. These include:

Instance Interface

Instance Attributes

obj

my $obj = $cb->obj;

The object on which operations are to be performed by callback methods.

type

my $type = $cb->type;

The type of object on which operations will be performed. This is generally a string such as "user" or "story".

class

my $class = $cb->class;

The class of object on which operations will be performed.

has_perms

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.

Instance Methods

manage_grps

$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.

Author

Scott Lanning <lannings@who.int>

See Also

Bric::App::Callback

The Bricolage base callback class, from which Bric::App::Callback::Profile inherits.

Bric::App::Callback::Profile

The user profile callback class, which inherits from Bric::App::Callback::Profile.

Copyright and License

Copyright (c) 2003-2004 World Health Organization and Kineticode, Inc. See Bric::License for complete license terms and conditions.