Model_Role

class Nos\User\Model_Role

Extend Nos\Orm\Model.

Relations

property Nos\User\Model_Role::$users

Methods

Nos\User\Model_Role::check_permission($permission_name, $category_key = null)
Parameters:
  • $permission_name (string) – Name of the permission to check against
  • $category_key (string) – (optional) If the permission has categories, the category key to check against
Returns:

True if the role has the required authorisation, false otherwise

Nos\User\Model_Role::listPermissionCategories($permission_name)

List all the categories of a given permission name. Returns an array of string or false when the role has not access, or the permission name does not exists.

param string $permission_name:
 The name of the permission to retrieve categories from
param string $category_key:
 (optional) If the permission has categories, the category key to check against
returns:array|false An array containing the list of categories (values) for the request permission name
Read the Docs v: chiba.1
Versions
latest
chiba.2
chiba.1
0.2
Downloads
PDF
HTML
Epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.