NAME

Net::Fluidinfo::Policy - Fluidinfo policies

SYNOPSIS

use Net::Fluidinfo::Policy;

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

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

DESCRIPTION

Net::Fluidinfo::Policy models Fluidinfo policies.

USAGE

Inheritance

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

Class methods

Net::Fluidinfo::Policy->get($fin, $user_or_username, $category, $action)

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

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

Net::Fluidinfo::Policy->get_action_policy_for_category($fin, $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 Fluidinfo.

$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.

FLUIDINFO DOCUMENTATION

Fluidinfo high-level description

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

Fluidinfo API specification

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

AUTHOR

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

COPYRIGHT AND LICENSE

Copyright (C) 2009-2011 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.