[ Index ] |
PHP Cross Reference of ACL Module |
[Source view] [Print] [Project Stats]
RestrictedActiveRecordBehavior Class File This class serves as a behavior for all the objects which have to control their access
Author: | dispy <dispyfree@googlemail.com> |
License: | LGPLv2 |
File Size: | 235 lines (10 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
RestrictedActiveRecordBehavior:: (7 methods):
generateAccessCheck()
beforeFind()
getDirectlyPermitted()
beforeSave()
beforeDelete()
afterSave()
grants()
Class: RestrictedActiveRecordBehavior - X-Ref
This class is intended tobe used as a behavior for objects which have restrictions on their accessgenerateAccessCheck($conditions = '', $params = array() X-Ref |
The following functions generates the CDbCriteria necessary to filter all accessable rows The CDbCriteria is solely passsed to the wrapped methods param: sql $conditions the conditions being passed to the real method param: array $params the params being passed to the real method param: array $options options to be used by the method itself (keys: disableInheritance) return: CDbCriteria the criteria assuring that the user only gets what he has access to |
beforeFind($event) X-Ref |
No description |
getDirectlyPermitted($actions = '*') X-Ref |
Gets the Aros who are directly (no inheritance!) permitted to perform one of the specified actions on this object param: mixed $actions the actions to be considered return: array All of the objects which have one of the permissions |
beforeSave($event) X-Ref |
This method checks whether the user has the right to update the current record By default, it's always allowed to create a new object. This object is automatically assigned to the user who created it with full permissions |
beforeDelete($event) X-Ref |
This method checks whether the user has the right to delete the current record |
afterSave($event) X-Ref |
This method takes care to assign individual rights to newly created objects param: CEvent $evt |
grants($permission) X-Ref |
Checks whether the current ARO has the given permission on this object param: string $permission |
Generated: Sun Jul 1 19:24:45 2012 | Cross-referenced by PHPXref 0.7.1 |