NAME

RT::DatabaseSetting - Represents a config setting

METHODS

Create PARAMHASH

Create takes a hash of values and creates a row in the database. Available keys are:

Name

Must be unique.

Content

If you provide a reference, we will automatically serialize the data structure using Storable. Otherwise any string is passed through as-is.

ContentType

Currently handles storable or application/json.

Returns a tuple of (status, msg) on failure and (id, msg) on success. Also automatically propagates this config change to all server processes.

CurrentUserCanSee

Returns true if the current user can see the database setting

Load

Load a setting from the database. Takes a single argument. If the argument is numerical, load by the column 'id'. Otherwise, load by the "Name" column.

SetName

Not permitted

ValidateName

Returns either (0, "failure reason") or 1 depending on whether the given name is valid.

Delete

Checks ACL, and on success propagates this config change to all server processes.

DecodedContent

Returns a pair of this setting's content and any error.

SetContent

PRIVATE METHODS

Documented for internal use only, do not call these from outside RT::DatabaseSetting itself.

_Set

Checks if the current user has SuperUser before calling SUPER::_Set, and then propagates this config change to all server processes.

_Value

Checks "CurrentUserCanSee" before calling SUPER::_Value.