NAME
Jifty::RightsFrom
SYNOPSIS
package Application::Model::Thing::Schema;
use Jifty::DBI::Schema;
use Application::Model::Person;
column owner_id => refers_to Application::Model::Person;
package Application::Model::Thing;
use base qw( Application::Record );
use Jifty::RightsFrom column => 'owner';
DESCRIPTION
Provides a delegate_current_user_can
method that various task-related objects can use as a base to make their own access control decisions based on their task. "current_user_can" in Jifty::Record uses this method to make an access control decision if it exists.
export_curried_sub HASHREF
Takes:
- sub_name
-
The subroutine in this package that you want to export.
- export_to
-
The name of the package you want to export to.
- as
-
The name your new curried sub should be exported into in the package
export_to
- args (arrayref)
-
The arguments you want to hand to your sub.
delegate_current_user_can
Seeing and editing task transactions (as well as other activities) are based on your rights on the task the transactions are on. Some finagling is necessary because, if this is a create call, this object does not have a task_id
yet, so we must rely on the value in the ATTRIBUTES passed in.