PermissionCatalogue
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
perm_items rows as [id, name, descr]. Ids are part of the schema (66 was retired and is never reused).
No description
Default perm_templ rows: five user templates, then their group twins with the same permissions. Keys: id, name, descr, template_type, permissions.
No description
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.
Default user_groups rows, each backed by the group template of the same 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).
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