NAME

Net::FluidDB::Policy - FluidDB policies

SYNOPSIS

use Net::FluidDB::Policy;

# get
$policy = Net::FluidDB::Policy->get($fdb, $user_or_username, $category, $action);
$policy->policy;
$policy->exceptions;

# update
$policy->policy('closed');
$policy->exceptions($exceptions);
$policy->update;

DESCRIPTION

Net::FluidDB::Policy models FluidDB policies.

USAGE

Inheritance

Net::FluidDB::Policy is a subclass of Net::FluidDB::ACL.

Class methods

Net::FluidDB::Policy->get($fdb, $user_or_username, $category, $action)

Retrieves the policy on action $action, for the category $category of user $user_or_username.

Net::FluidDB provides a convenience shortcut for this method.

Net::FluidDB::Policy->get_action_policy_for_category($fdb, $user_or_username)

These are convenience methods, there's one for each defined pair action/category:

get_create_policy_for_namespaces
...
get_update_policy_for_tags
...
get_read_policy_for_tag_values
...

Instance Methods

$tag->update

Updates the policy in FluidDB.

$tag->username

Returns the username of the user the policy concerns to.

$tag->category

Returns the category the policy is about.

$tag->action

Returns the action the policy is about.

FLUIDDB DOCUMENTATION

FluidDB high-level description

http://doc.fluidinfo.com/fluidDB/permissions.html#policies-and-their-exceptions

FluidDB API specification

http://api.fluidinfo.com/fluidDB/api/*/policies/*

AUTHOR

Xavier Noria (FXN), <fxn@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2009 Xavier Noria

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.