permission
class permission implements tool_interface
Migration permission management tool
Properties
protected auth | $auth | ||
protected auth_admin | $auth_admin | ||
protected service | $cache | ||
protected driver_interface | $db | ||
protected string | $phpbb_root_path | ||
protected string | $php_ext |
Methods
Constructor
Retrieve a short name used for commands in migrations.
Permission Exists
Permission Add
Permission Remove
Check if a permission role exists
Add a new permission role
Update the name on a permission role
Remove a permission role
Permission Set
Permission Unset
Reverse an original install action
Details
at line 48
__construct(driver_interface $db, service $cache, auth $auth, string $phpbb_root_path, string $php_ext)
Constructor
at line 66
string
get_name()
Retrieve a short name used for commands in migrations.
at line 81
bool
exists(string $auth_option, bool $global = true)
Permission Exists
Check if a permission (auth) setting exists
at line 120
null
add(string $auth_option, bool $global = true, int|false $copy_from = false)
Permission Add
Add a permission (auth) option
at line 197
null
remove(string $auth_option, bool $global = true)
Permission Remove
Remove a permission (auth) option
at line 253
int
role_exists(string $role_name)
Check if a permission role exists
at line 274
null
role_add(string $role_name, string $role_type, string $role_description = '')
Add a new permission role
at line 309
null
role_update(string $old_role_name, string $new_role_name)
Update the name on a permission role
at line 328
null
role_remove(string $role_name)
Remove a permission role
at line 420
null
permission_set(string $name, string|array $auth_option, string $type = 'role', bool $has_permission = true)
Permission Set
Allows you to set permissions for a certain group/role
at line 570
null
permission_unset(string $name, string|array $auth_option, string $type = 'role')
Permission Unset
Allows you to unset (remove) permissions for a certain group/role
at line 655
null
reverse()
Reverse an original install action
First argument is the original call to the class (e.g. add, remove) After the first argument, send the original arguments to the function in the original call