Detailed Description
Rights authorization manager class file.
- Author
- Christoffer Niska cnisk.nosp@m.a@li.nosp@m.ve.co.nosp@m.m
- Copyright
- Copyright © 2010 Christoffer Niska
- Since
- 0.9.7
Definition at line 10 of file RDbAuthManager.php.
Member Function Documentation
RDbAuthManager::addItemChild |
( |
|
$itemName, |
|
|
|
$childName |
|
) |
| |
Adds an item as a child of another item. Overloads the parent method to make sure that we do not add already existing children.
- Parameters
-
string | $itemName | the item name. |
string | $childName | the child item name. |
- Exceptions
-
CException | if either parent or child doesn't exist or if a loop has been detected. |
Definition at line 30 of file RDbAuthManager.php.
RDbAuthManager::assign |
( |
|
$itemName, |
|
|
|
$userId, |
|
|
|
$bizRule = null , |
|
|
|
$data = null |
|
) |
| |
Assigns an authorization item to a user making sure that the user doesn't already have this assignment. Overloads the parent method to make sure that we do not assign already assigned items.
- Parameters
-
string | $itemName | the item name. |
mixed | $userId | the user ID (see IWebUser::getId) |
string | $bizRule | the business rule to be executed when checkAccess is called for this particular authorization item. |
mixed | $data | additional data associated with this assignment. |
- Returns
- CAuthAssignment the authorization assignment information.
- Exceptions
-
CException | if the item does not exist or if the item has already been assigned to the user. |
Definition at line 54 of file RDbAuthManager.php.
RDbAuthManager::getAssignmentsByItemName |
( |
|
$name | ) |
|
RDbAuthManager::getAuthItem |
( |
|
$name, |
|
|
|
$allowCaching = true |
|
) |
| |
Returns the authorization item with the specified name. Overloads the parent method to allow for runtime caching.
- Parameters
-
string | $name | the name of the item. |
boolean | $allowCaching | whether to accept cached data. |
- Returns
- CAuthItem the authorization item. Null if the item cannot be found.
Definition at line 71 of file RDbAuthManager.php.
RDbAuthManager::getAuthItems |
( |
|
$type = null , |
|
|
|
$userId = null , |
|
|
|
$sort = true |
|
) |
| |
Returns the authorization items of the specific type and user. Overloads the parent method to allow for sorting.
- Parameters
-
integer | $type | the item type (0: operation, 1: task, 2: role). Defaults to null, meaning returning all items regardless of their type. |
mixed | $userId | the user ID. Defaults to null, meaning returning all items even if they are not assigned to a user. |
boolean | $sort | whether to sort the items according to their weights. |
- Returns
- array the authorization items of the specific type.
Definition at line 133 of file RDbAuthManager.php.
RDbAuthManager::getAuthItemsByNames |
( |
|
$names, |
|
|
|
$nested = false |
|
) |
| |
Returns the specified authorization items.
- Parameters
-
array | $names | the names of the authorization items to get. |
boolean | $nested | whether to nest the items by type. |
- Returns
- array the authorization items.
Definition at line 99 of file RDbAuthManager.php.
RDbAuthManager::getItemChildren |
( |
|
$names, |
|
|
|
$allowCaching = true |
|
) |
| |
Returns the children of the specified item. Overloads the parent method to allow for caching.
- Parameters
-
mixed | $names | the parent item name. This can be either a string or an array. The latter represents a list of item names (available since version 1.0.5). |
boolean | $allowCaching | whether to accept cached data. |
- Returns
- array all child items of the parent
Definition at line 195 of file RDbAuthManager.php.
RDbAuthManager::updateItemWeight |
( |
|
$result | ) |
|
Updates the authorization items weight.
- Parameters
-
array | $result | the result returned from jui-sortable. |
Definition at line 264 of file RDbAuthManager.php.
Member Data Documentation
RDbAuthManager::$_itemChildren = array() |
|
private |
RDbAuthManager::$_items = array() |
|
private |
RDbAuthManager::$rightsTable = 'Rights' |
The documentation for this class was generated from the following file: