NAME

Jifty::API - Manages and allow reflection on the Jifty::Actions that make up a Jifty application's API

METHODS

new

Creates a new Jifty::API object

qualify ACTIONNAME

Returns the fully qualified package name for the given provided action. If the ACTIONNAME starts with Jifty:: or ApplicationClass::Action, simply returns the given name; otherwise, it prefixes it with the ApplicationClass::Action.

reset

Resets which actions are allowed to the defaults; that is, all of the application's actions, Jifty::Action::Autocomplete, and Jifty::Action::Redirect are allowed; everything else is denied. See "restrict" for the details of how limits are processed.

allow RESTRICTIONS

Takes a list of strings or regular expressions, and adds them in order to the list of limits for the purposes of "is_allowed". See "restrict" for the details of how limits are processed.

deny RESTRICTIONS

Takes a list of strings or regular expressions, and adds them in order to the list of limits for the purposes of "is_allowed". See "restrict" for the details of how limits are processed.

restrict POLARITY RESTRICTIONS

Method that "allow" and and "deny" call internally; POLARITY is either allow or deny. Allow and deny limits are evaluated in the order they're called. The last limit that applies will be the one which takes effect. Regexes are matched against the class; strings are fully /qualify and used as an exact match against the class name. The base set of restrictions (which is reset every request) is set in "reset", and usually modified by the application's Jifty::Dispatcher if need be.

If you call:

    Jifty->api->deny  ( qr'Foo' );
    Jifty->api->allow ( qr'FooBar' );
    Jifty->api->deny  ( qr'FooBarDeleteTheWorld' );

..then:

    calls to MyApp::Action::Baz will succeed.
    calls to MyApp::Action::Foo will fail.
    calls to MyApp::Action::FooBar will pass.
    calls to MyApp::Action::TrueFoo will fail.
    calls to MyApp::Action::TrueFooBar will pass.
    calls to MyApp::Action::TrueFooBarDeleteTheWorld will fail.
    calls to MyApp::Action::FooBarDeleteTheWorld will fail.

is_allowed CLASS

Returns false if the CLASS name (which is fully qualified if it is not already) is allowed to be executed. See "restrict" above for the rules that the class name must pass.

actions

Lists the class names of all of the allowed actions for this Jifty application; this may include actions under the Jifty::Action:: namespace, in addition to your application's actions.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 123:

alternative text '/qualify' contains non-escaped | or /