The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Jifty::Plugin::Quota - Provides a framework for generic quota management of Jifty model objects

SYNOPSIS

In your config.yml:

  Plugins:
    - Quota:
        disk:
          User: 5242880   # bytes (5MB)
          Group: 10485760

By inserting hooks and checks into an app (actions and models, most likely), quotas can be updated and enforced. It is up to the developer to do this though; this plugin just provides a ready-made framework.

The configuration provides defaults for quota creation. It is structured by type and then object_class. In the example above, the default disk space quotas for User and Group model objects are set. When a new quota is created and a cap is not specified, the plugin will look up the default in the config.

METHODS

config

init

default_cap TYPE CLASS

Returns the default cap (if there is one) as specified by the config for the given TYPE and CLASS. Returns undef otherwise.