final class PermissionCatalogue (View source)

The seed data every fresh installation starts from: the perm_items table, the default permission templates, and the default user groups. The installer and the sql/poweradmin-*-db-structure.sql files (via composer sql:seed) both read it, so a new permission or template is added here only.

Constants

private ROLE_ADMINISTRATOR

private ROLE_ZONE_MANAGER

private ROLE_EDITOR

private ROLE_VIEWER

private ROLE_GUEST

private LAST_ORIGINAL_TEMPLATE_PERMISSION_ID

perm_templ_items rows were appended to the schema files permission by permission after this id, so numbering follows that order to stay diffable.

Methods

static array
permissions()

perm_items rows as [id, name, descr]. Ids are part of the schema (66 was retired and is never reused).

static int
permissionId(string $name)

No description

static array
templates()

Default perm_templ rows: five user templates, then their group twins with the same permissions. Keys: id, name, descr, template_type, permissions.

static array
templatesOfType(string $templateType)

No description

static array
templateItems()

perm_templ_items rows as [id, templ_id, perm_id], numbered in the order the schema files accumulated them: the original set template by template, then each later permission across all templates.

static array
groups()

Default user_groups rows, each backed by the group template of the same name.

static int
templateId(string $name)

No description

Details

static array permissions()

perm_items rows as [id, name, descr]. Ids are part of the schema (66 was retired and is never reused).

Return Value

array

static int permissionId(string $name)

No description

Parameters

string $name

Return Value

int

static array templates()

Default perm_templ rows: five user templates, then their group twins with the same permissions. Keys: id, name, descr, template_type, permissions.

Return Value

array

static array templatesOfType(string $templateType)

No description

Parameters

string $templateType

Return Value

array

static array templateItems()

perm_templ_items rows as [id, templ_id, perm_id], numbered in the order the schema files accumulated them: the original set template by template, then each later permission across all templates.

Return Value

array

static array groups()

Default user_groups rows, each backed by the group template of the same name.

Return Value

array

static int templateId(string $name)

No description

Parameters

string $name

Return Value

int