Bric::App::Authz

NAME

Bric::App::Authz - Exports functions for checking user authorization.

VERSION

$LastChangedRevision$

DATE

$LastChangedDate$

SYNOPSIS

use Bric::App::Authz qw(:all);

chk_authz($obj, READ);
# If we get here, we can read $obj.

chk_authz($obj, EDIT);
# If we get here, we can edit $obj.

chk_authz($obj, CREATE);
# If we get here, we can create $obj.

DESCRIPTION

This package exports the function chk_authz(), which will return true if the current user has permission to perform a given activity to $obj, and redirect to an error page if the user does not have the permission. The permissions available are also exported. They are READ, EDIT, and CREATE. CREATE includes READ and CREATE permissions while EDIT includes READ permission.

INTERFACE

Constructors

NONE.

Destructors

Public Class Methods

NONE.

Public Functions

PRIVATE

Private Class Methods

NONE.

Private Instance Methods

NONE.

Private Functions

NONE.

NOTES

NONE.

AUTHOR

David Wheeler

SEE ALSO

Bric, Bric::Biz::Person::User