RT 4.2.16 Documentation

RT::System

Go to latest version →

NAME

RT::System

DESCRIPTION

RT::System is a simple global object used as a focal point for things that are system-wide.

It works sort of like an RT::Record, except it's really a single object that has an id of "1" when instantiated.

This gets used by the ACL system so that you can have rights for the scope "RT::System"

In the future, there will probably be other API goodness encapsulated here.

AvailableRights

Returns a hashref of available rights for this object. The keys are the right names and the values are a description of what the rights do.

This method as well returns rights of other RT objects, like RT::Queue or RT::Group, to allow users to apply those rights globally.

If an RT::Principal is passed as the first argument, the available rights will be limited to ones which make sense for the principal. Currently only role groups are supported and rights announced by object types to which the role group doesn't apply are not returned.

RightCategories

Returns a hashref where the keys are rights for this type of object and the values are the category (General, Staff, Admin) the right falls into.

id

Returns RT::System's id. It's 1.

Load

Since this object is pretending to be an RT::Record, we need a load method. It does nothing

QueueCacheNeedsUpdate ( 1 )

Attribute to decide when SelectQueue needs to flush the list of queues and retrieve new ones. Set when queues are created, enabled/disabled and on certain acl changes. Should also better understand group management.

If passed a true value, will update the attribute to be the current time.

AddUpgradeHistory package, data

Adds an entry to the upgrade history database. The package can be either RT for core RT upgrades, or the fully qualified name of a plugin. The data must be a hash reference.

UpgradeHistory [package]

Returns the entries of RT's upgrade history. If a package is specified, the list of upgrades for that package will be returned. Otherwise a hash reference of package => [upgrades] will be returned.

← Back to index