Yii Access Control Lists  0.8
Advanced and convenient Access Control
Public Member Functions | Static Public Member Functions | Protected Member Functions
AroCollection Class Reference
Inheritance diagram for AroCollection:
ACLObjectCollection ACLObject

List of all members.

Public Member Functions

 init ()
 may ($obj, $action)
 grant ($obj, $actions)
 deny ($obj, $actions)
 addPositionCheck ($positions, $type)
 tableName ()
 relations ()

Static Public Member Functions

static model ($className=__CLASS__)

Protected Member Functions

 addPermissionCheck (&$cmd, $obj, $action)

Detailed Description

AroCollection Class File

Author:
zeroByte <dispyfree@googlemail.com>

Member Function Documentation

AroCollection::addPermissionCheck ( &$  cmd,
obj,
action 
) [protected]

Adds the (complicated) permission check to the given query

Parameters:
CDbCommand$cmdthe DB-command to add the check to
unknown$objAn Object identifier
Returns:
CDbCommand The extended Db-command
AroCollection::addPositionCheck ( positions,
type 
)

Builds a single SQL-statement comprising all given positions This SQL-statement will match all those rows being located somewhere left from lft and right from rgt of each given position

Parameters:
array$positionsAll positions to include in our statement
string$typeaco/aro
Returns:
string the finished SQL-statement
AroCollection::deny ( obj,
actions 
)

Denies the object denoted by the $obj-identifier the given actions

Parameters:
type$objthe object identifier
array$actionsthe actions to deny
Returns:
bool
AroCollection::grant ( obj,
actions 
)

Grants the object denoted by the $obj-identifier the given actions

Parameters:
type$objthe object identifier
array$actionsthe actions to grant
Returns:
bool
AroCollection::init ( )

We have to overwrite the table as we don't want to operate on a tree of collections but on a tree of nodes

AroCollection::may ( obj,
action 
)

Looks up if the user is granted a specific action to the given object

Parameters:
string | array$objThe object to be checked
string$actionthe action to be performed
Returns:
bool true if access is granted, false otherwise
static AroCollection::model ( className = __CLASS__) [static]

Returns the static model of the specified AR class.

Parameters:
string$classNameactive record class name.
Returns:
AcoCollection the static model class

Reimplemented from ACLObjectCollection.

AroCollection::relations ( )
Returns:
array relational rules.

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