HijackaccountAccessControl Class Reference
Defauklt Access Control for hijacking accounts. More...
Inheritance diagram for
HijackaccountAccessControl:
Public Member Functions |
|
__construct () | |
Constructor. |
|
Protected Member Functions |
|
do_is_allowed_for_user ($action, $item, $user, $params=false) | |
Overloadable. |
Detailed Description
Defauklt Access Control for hijacking accounts.
Definition at line 5 of file hijackaccount.access.php.
Constructor & Destructor Documentation
HijackaccountAccessControl::__construct | ( | ) |
Constructor.
Sets type on parent.
Definition at line 9 of file hijackaccount.access.php.
00009 { 00010 parent::__construct('users'); 00011 }
Member Function Documentation
HijackaccountAccessControl::do_is_allowed_for_user | ( | $ | action, | |
$ | item, | |||
$ | user, | |||
$ | params = false |
|||
) | [protected] |
Overloadable.
Check if action on object is allowed for given user
User is always valid
- Parameters:
-
string $action The action to perform (edit, delete, ....) DAOHtmlpage $item Item to perform the action on (may be a DataObject, e.g.) DAOUsers $user A user, role, ACO, depending on user management chosen
- Returns:
- int One of Constants ALLOWED, NOT_ALLOWED and NOT_RESPONSIBLE
Reimplemented from AccessControlBase.
Definition at line 23 of file hijackaccount.access.php.
00023 { 00024 // we know that item is of type "users" 00025 $ret = self::NOT_RESPONSIBLE; 00026 switch ($action) { 00027 case 'hijack': 00028 // Admins are allowed to hijack 00029 $ret = $this->to_result($user->has_role(USER_ROLE_ADMIN)); 00030 break; 00031 } 00032 return $ret; 00033 }
The documentation for this class was generated from the following file:
- contributions/usermanagement.hijackaccount/behaviour/accesscontrol/hijackaccount.access.php