NAME

AxKit::App::TABOO::Data::User::Contributor - Contributor Data objects for TABOO

SYNOPSIS

use AxKit::App::TABOO::Data::User::Contributor;
$user = AxKit::App::TABOO::Data::User::Contributor->new();
$user->load('kjetil');
my $fullname = $user->load_authlevel('kjetil');

DESCRIPTION

This Data class subclasses AxKit::App::TABOO::Data::User to add an authentication level and optional biographical information for a contributor to a site.

METHODS

This class implements two methods, the rest is inherited from AxKit::App::TABOO::Data::User.

new()

The constructor. Makes sure that we inherit the data members from our superclass. Apart from that, nothing special.

load_authlevel($username)

This is an ad hoc method to retrieve the authorization level of a user, and it takes a $username key to identify whose level to retrieve. It will return a number that may be used to decide whether or not to grant access to an object or a data member. It will also populate the corresponding data fields of the object. You may therefore call write_xml on the object afterwards and have markup for the username and level.

STORED DATA

The data is stored in named fields, and for certain uses, it is good to know them. If you want to subclass this class, you might want to use the same names, see the documentation of AxKit::APP::TABOO::Data for more about this.

In addition to the names of the parent, this class adds the following fields:

  • authlevel

    An integer representing the authorization level of a user. In the present implementation, it is a signed two-byte integer. It is intended to be used to decide whether or not to grant access to an object or a data member.

  • bio

    The contributors biographical information.

This is likely to be extended in future versions.

FORMALITIES

See AxKit::App::TABOO.