Bric::App::Callback::Profile(3p)

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:

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

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.