NAME

Pangloss::User - a user in Pangloss.

SYNOPSIS

use Pangloss::User;
my $user = new Pangloss::User();

$user->id( $id )
     ->name( $full_name )
     ->privileges( Pangloss::User::Privileges->new )
     ->creator( $user )
     ->notes( $text )
     ->date( time )
     ->validate;

# catch Pangloss::User::Errors

do { ... } if $user->is_admin;
do { ... } if $user->is_translator;
do { ... } if $user->is_proofreader;

# etc...

DESCRIPTION

This class represents a user in Pangloss. A new user always has an empty set of privileges.

This object inherits its interface from Pangloss::StoredObject and OpenFrame::WebApp::User.

METHODS

$obj->id

set/get user id (ie: login name).

$obj->name

set/get user full name.

privileges()

set/get user Pangloss::User::Privileges.

is_admin()

test privileges to see if user is an admin.

is_translator(), is_proofreader()

test privileges to see if user can translate/proofread one or more Pangloss::Languages.

can_add_concepts(), can_add_categories()

test privileges to see if user can add concepts/categories.

can_translate( $lang ), can_proofread( $lang )

test privileges to see if user can translate/proofread the Pangloss::Language.

not_admin()

test privileges to see if user is not an admin.

not_translator(), not_proofreader()

test privileges to see if user cannot translate/proofread any Pangloss::Languages.

cant_add_concepts(), cant_add_categories()

test privileges to see if user cannot add concepts/categories.

cant_translate( $lang ), cant_proofread( $lang )

test privileges to see if user cannot translate/proofread the given Pangloss::Language.

AUTHOR

Steve Purkis <spurkis@quiup.com>

SEE ALSO

Pangloss, Pangloss::User::Error, Pangloss::User::Privileges, Pangloss::Users, OpenFrame::WebApp::User