Public Member Functions | |
addItemChild ($itemName, $childName) | |
assign ($itemName, $userId, $bizRule=null, $data=null) | |
getAuthItem ($name, $allowCaching=true) | |
getAuthItemsByNames ($names, $nested=false) | |
getAuthItems ($type=null, $userId=null, $sort=true) | |
getItemChildren ($names, $allowCaching=true) | |
getAssignmentsByItemName ($name) | |
updateItemWeight ($result) |
Public Attributes | |
$rightsTable = 'Rights' |
Rights authorization manager class file.
Definition at line 9 of file RDbAuthManager.php.
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.
string | $itemName | the item name. |
string | $childName | the child item name. |
CException | if either parent or child doesn't exist or if a loop has been detected. |
Definition at line 27 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.
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. |
CException | if the item does not exist or if the item has already been assigned to the user. |
Definition at line 47 of file RDbAuthManager.php.
RDbAuthManager::getAuthItem | ( | $name, | |
$allowCaching = true |
|||
) |
Returns the authorization item with the specified name. Overloads the parent method to allow for runtime caching.
string | $name | the name of the item. |
boolean | $allowCaching | whether to accept cached data. |
Definition at line 61 of file RDbAuthManager.php.
References getAuthItems().
Referenced by updateItemWeight().
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.
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. |
Definition at line 121 of file RDbAuthManager.php.
Referenced by getAuthItem(), and getAuthItemsByNames().
RDbAuthManager::getAuthItemsByNames | ( | $names, | |
$nested = false |
|||
) |
Returns the specified authorization items.
array | $names | the names of the authorization items to get. |
boolean | $nested | whether to nest the items by type. |
Definition at line 89 of file RDbAuthManager.php.
References getAuthItems().
RDbAuthManager::getItemChildren | ( | $names, | |
$allowCaching = true |
|||
) |
Returns the children of the specified item. Overloads the parent method to allow for caching.
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. |
Definition at line 189 of file RDbAuthManager.php.
References Rights\getAuthorizer().
RDbAuthManager::updateItemWeight | ( | $result | ) |
Updates the authorization items weight.
array | $result | the result returned from jui-sortable. |
Definition at line 271 of file RDbAuthManager.php.
References getAuthItem().