HCE Project DC service web UI  0.2
Hierarchical Cluster Engine DC service web UI
 All Classes Namespaces Files Functions Variables Pages
RDbAuthManager Class Reference

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'

Private Attributes

 $_items = array()
 $_itemChildren = array()

Detailed Description

Rights authorization manager class file.

Author
Christoffer Niska cnisk.nosp@m.a@li.nosp@m.ve.co.nosp@m.m
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$itemNamethe item name.
string$childNamethe child item name.
Exceptions
CExceptionif 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$itemNamethe item name.
mixed$userIdthe user ID (see IWebUser::getId)
string$bizRulethe business rule to be executed when checkAccess is called for this particular authorization item.
mixed$dataadditional data associated with this assignment.
Returns
CAuthAssignment the authorization assignment information.
Exceptions
CExceptionif 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)

Definition at line 241 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.

Parameters
string$namethe name of the item.
boolean$allowCachingwhether to accept cached data.
Returns
CAuthItem the authorization item. Null if the item cannot be found.

Definition at line 71 of file RDbAuthManager.php.

Here is the call graph for this function:

Here is the caller graph for this function:

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$typethe item type (0: operation, 1: task, 2: role). Defaults to null, meaning returning all items regardless of their type.
mixed$userIdthe user ID. Defaults to null, meaning returning all items even if they are not assigned to a user.
boolean$sortwhether 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.

Here is the caller graph for this function:

RDbAuthManager::getAuthItemsByNames (   $names,
  $nested = false 
)

Returns the specified authorization items.

Parameters
array$namesthe names of the authorization items to get.
boolean$nestedwhether to nest the items by type.
Returns
array the authorization items.

Definition at line 99 of file RDbAuthManager.php.

Here is the call graph for this function:

RDbAuthManager::getItemChildren (   $names,
  $allowCaching = true 
)

Returns the children of the specified item. Overloads the parent method to allow for caching.

Parameters
mixed$namesthe 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$allowCachingwhether to accept cached data.
Returns
array all child items of the parent

Definition at line 195 of file RDbAuthManager.php.

Here is the call graph for this function:

RDbAuthManager::updateItemWeight (   $result)

Updates the authorization items weight.

Parameters
array$resultthe result returned from jui-sortable.

Definition at line 264 of file RDbAuthManager.php.

Here is the call graph for this function:

Member Data Documentation

RDbAuthManager::$_itemChildren = array()
private

Definition at line 18 of file RDbAuthManager.php.

RDbAuthManager::$_items = array()
private

Definition at line 17 of file RDbAuthManager.php.

RDbAuthManager::$rightsTable = 'Rights'

Definition at line 15 of file RDbAuthManager.php.


The documentation for this class was generated from the following file: