Resource

Summary
Resource
AuthorJaybill McCarthy
Licensehttp://communit.as/docs/license
See AlsoCts_Controller_Action_Abstract Cts_Controller_Action_Admin
Instance Methods
initInvoked automatically when an instance is created.
Actions
editEdit which resources a role has access to by module.
Private or Protected Methods
isResourceInheritedUsed by edit to determine if the permissions on a resource are inherited from another role.

Author

Jaybill McCarthy

Instance Methods

init

function init()

Invoked automatically when an instance is created.  Initializes the current instance.  Initializes the parent object (calls init() on the parent instance).

Actions

edit

function editAction()

Edit which resources a role has access to by module.

HTTP GET or POST Parameters

idrole id to edit resources for (id, not shortname)
modidmodule id of module to edit resources for. defaults to ‘default’

View Variables

actionsAn array of all available actions in the app.
pagetitleThe HTML page title.
rolearray containing the role information for the chosen role
modidid of the current module
module_titleName of the current module, pulled from module.ini
enabled_modulesAn array of modules that are currently enabled

Private or Protected Methods

isResourceInherited

protected function isResourceInherited($module,
$controller,
$action,
$role_id)

Used by edit to determine if the permissions on a resource are inherited from another role.

Arguments

$moduleThe name of the module for the resource in question.
$controllerThe name of the controller for the resource in question.
$actionThe name of the action for the resource in question.
$role_idThe ID of the role in question.

Returns

A boolean indicating whether the permissions on the indicated resource are inherited from another role.

function init()
Invoked automatically when an instance is created.
function editAction()
Edit which resources a role has access to by module.
protected function isResourceInherited($module,
$controller,
$action,
$role_id)
Used by edit to determine if the permissions on a resource are inherited from another role.
Close