NAME

WE_Sample::Root - a sample implementation for a site

SYNOPSIS

$root = new WE_Sample::Root -rootdir => $root_directory_for_database;

DESCRIPTION

A sample instantiation for WE::DB. This is mainly used for the WE_Framework test suite.

METHODS

is_allowed($action, $object_id)

Return a true value if the current user is allowed to do $action on object $object_id.

Currently are these actions defined:

release

The user is allowed to release a document ("freigeben").

publish

The user is allowed to publish a site.

change-folder

The user is allowed to do folder manipulation, that is, he is allowed to add or delete folders.

change-doc

The user is allowed to do document manipulation, that is, he is allowed to add, edit or delete documents.

If there is no current user, then always a false value is returned.

get_released_children($folder_id)

Return all folders and released children as an array of objects.

get_released_object($object_id)

Return the last released version for $object_id. If there is no released version yet, return undef.

AUTHOR

Slaven Rezic - slaven@rezic.de

SEE ALSO

WE::DB, WE_Singlesite::Root.