ILIAS
Release_3_10_x_branch Revision 61812
|
Class ilAccessHandler. More...
Public Member Functions | |
ilAccessHandler () | |
constructor | |
storeAccessResult ($a_permission, $a_cmd, $a_ref_id, $a_access_granted, $a_user_id="", $a_info="") | |
store access result | |
getStoredAccessResult ($a_permission, $a_cmd, $a_ref_id, $a_user_id="") | |
get stored access result | |
storeCache () | |
readCache ($a_secs=0) | |
getResults () | |
setResults ($a_results) | |
addInfoItem ($a_type, $a_text, $a_data="") | |
add an info item to current info object | |
checkAccess ($a_permission, $a_cmd, $a_ref_id, $a_type="", $a_obj_id="", $a_tree_id="") | |
check access for an object (provide $a_type and $a_obj_id if available for better performance) | |
checkAccessOfUser ($a_user_id, $a_permission, $a_cmd, $a_ref_id, $a_type="", $a_obj_id="", $a_tree_id="") | |
check access for an object (provide $a_type and $a_obj_id if available for better performance) | |
getInfo () | |
get last info object | |
getResultLast () | |
get last info object | |
getResultAll ($a_ref_id="") | |
doCacheCheck ($a_permission, $a_cmd, $a_ref_id, $a_user_id) | |
look if result for current query is already in cache | |
doTreeCheck ($a_permission, $a_cmd, $a_ref_id, $a_user_id) | |
check if object is in tree and not deleted | |
doRBACCheck ($a_permission, $a_cmd, $a_ref_id, $a_user_id) | |
rbac check for current object | |
doPathCheck ($a_permission, $a_cmd, $a_ref_id, $a_user_id, $a_all=false) | |
check read permission for all parents | |
doActivationCheck ($a_permission, $a_cmd, $a_ref_id, $a_user_id, $a_all=false) | |
check for course activation | |
preloadActivationTimes ($a_ref_ids) | |
preload activation times of course items loads all required timing data for the given ref ids | |
doConditionCheck ($a_permission, $a_cmd, $a_ref_id, $a_user_id, $a_obj_id, $a_type) | |
condition check (currently only implemented for read permission) | |
doStatusCheck ($a_permission, $a_cmd, $a_ref_id, $a_user_id, $a_obj_id, $a_type) | |
object type specific check | |
clear () | |
enable ($a_str, $a_bool) |
Class ilAccessHandler.
Checks access for ILIAS objects
Definition at line 40 of file class.ilAccessHandler.php.
ilAccessHandler::addInfoItem | ( | $a_type, | |
$a_text, | |||
$a_data = "" |
|||
) |
add an info item to current info object
Definition at line 179 of file class.ilAccessHandler.php.
ilAccessHandler::checkAccess | ( | $a_permission, | |
$a_cmd, | |||
$a_ref_id, | |||
$a_type = "" , |
|||
$a_obj_id = "" , |
|||
$a_tree_id = "" |
|||
) |
check access for an object (provide $a_type and $a_obj_id if available for better performance)
string | $a_permission | |
string | $a_cmd | |
int | $a_ref_id | |
string | $a_type | (optional) |
int | $a_obj_id | (optional) |
int | $a_tree_id | (optional) |
Definition at line 196 of file class.ilAccessHandler.php.
References checkAccessOfUser().
ilAccessHandler::checkAccessOfUser | ( | $a_user_id, | |
$a_permission, | |||
$a_cmd, | |||
$a_ref_id, | |||
$a_type = "" , |
|||
$a_obj_id = "" , |
|||
$a_tree_id = "" |
|||
) |
check access for an object (provide $a_type and $a_obj_id if available for better performance)
integer | $a_user_id | |
string | $a_permission | |
string | $a_cmd | |
int | $a_ref_id | |
string | $a_type | (optional) |
int | $a_obj_id | (optional) |
int | $a_tree_id | (optional) |
Definition at line 216 of file class.ilAccessHandler.php.
References $ilBench, $lng, ilObject\_lookupObjId(), ilObject\_lookupType(), doCacheCheck(), doConditionCheck(), doPathCheck(), doRBACCheck(), doStatusCheck(), doTreeCheck(), IL_NO_PARENT_ACCESS, IL_NO_PERMISSION, and storeAccessResult().
Referenced by checkAccess(), doActivationCheck(), doConditionCheck(), and doPathCheck().
ilAccessHandler::clear | ( | ) |
Definition at line 689 of file class.ilAccessHandler.php.
ilAccessHandler::doActivationCheck | ( | $a_permission, | |
$a_cmd, | |||
$a_ref_id, | |||
$a_user_id, | |||
$a_all = false |
|||
) |
check for course activation
Definition at line 515 of file class.ilAccessHandler.php.
References $ilBench, $ilLog, ilCourseItems\_readActivationTimes(), checkAccessOfUser(), IL_CRS_TIMINGS_ACTIVATION, and preloadActivationTimes().
Referenced by doPathCheck().
ilAccessHandler::doCacheCheck | ( | $a_permission, | |
$a_cmd, | |||
$a_ref_id, | |||
$a_user_id | |||
) |
look if result for current query is already in cache
Definition at line 347 of file class.ilAccessHandler.php.
References $ilBench, and getStoredAccessResult().
Referenced by checkAccessOfUser().
ilAccessHandler::doConditionCheck | ( | $a_permission, | |
$a_cmd, | |||
$a_ref_id, | |||
$a_user_id, | |||
$a_obj_id, | |||
$a_type | |||
) |
condition check (currently only implemented for read permission)
Definition at line 623 of file class.ilAccessHandler.php.
References $ilBench, $lng, ilConditionHandler\_checkAllConditionsOfTarget(), ilConditionHandler\_getConditionsOfTarget(), ilObject\_lookupTitle(), checkAccessOfUser(), and IL_MISSING_PRECONDITION.
Referenced by checkAccessOfUser().
ilAccessHandler::doPathCheck | ( | $a_permission, | |
$a_cmd, | |||
$a_ref_id, | |||
$a_user_id, | |||
$a_all = false |
|||
) |
check read permission for all parents
Definition at line 465 of file class.ilAccessHandler.php.
References $ilBench, $lng, checkAccessOfUser(), doActivationCheck(), and IL_NO_PARENT_ACCESS.
Referenced by checkAccessOfUser().
ilAccessHandler::doRBACCheck | ( | $a_permission, | |
$a_cmd, | |||
$a_ref_id, | |||
$a_user_id | |||
) |
rbac check for current object
Definition at line 433 of file class.ilAccessHandler.php.
References $ilBench, $ilErr, $ilLog, $lng, IL_NO_PERMISSION, and storeAccessResult().
Referenced by checkAccessOfUser().
ilAccessHandler::doStatusCheck | ( | $a_permission, | |
$a_cmd, | |||
$a_ref_id, | |||
$a_user_id, | |||
$a_obj_id, | |||
$a_type | |||
) |
object type specific check
Definition at line 656 of file class.ilAccessHandler.php.
References $ilBench, $location, and storeAccessResult().
Referenced by checkAccessOfUser().
ilAccessHandler::doTreeCheck | ( | $a_permission, | |
$a_cmd, | |||
$a_ref_id, | |||
$a_user_id | |||
) |
check if object is in tree and not deleted
Definition at line 373 of file class.ilAccessHandler.php.
References $ilBench, $lng, IL_DELETED, IL_NO_PERMISSION, and storeAccessResult().
Referenced by checkAccessOfUser().
ilAccessHandler::enable | ( | $a_str, | |
$a_bool | |||
) |
Definition at line 696 of file class.ilAccessHandler.php.
ilAccessHandler::getInfo | ( | ) |
get last info object
Definition at line 317 of file class.ilAccessHandler.php.
ilAccessHandler::getResultAll | ( | $a_ref_id = "" | ) |
Definition at line 333 of file class.ilAccessHandler.php.
References $results.
ilAccessHandler::getResultLast | ( | ) |
get last info object
Definition at line 328 of file class.ilAccessHandler.php.
ilAccessHandler::getResults | ( | ) |
Definition at line 166 of file class.ilAccessHandler.php.
References $results.
ilAccessHandler::getStoredAccessResult | ( | $a_permission, | |
$a_cmd, | |||
$a_ref_id, | |||
$a_user_id = "" |
|||
) |
get stored access result
private
string | $a_permission | permission |
string | $a_cmd | command string |
int | $a_ref_id | reference id |
int | $a_user_id | user id (if no id passed, current user id) |
Definition at line 119 of file class.ilAccessHandler.php.
Referenced by doCacheCheck().
ilAccessHandler::ilAccessHandler | ( | ) |
constructor
Definition at line 45 of file class.ilAccessHandler.php.
ilAccessHandler::preloadActivationTimes | ( | $a_ref_ids | ) |
preload activation times of course items loads all required timing data for the given ref ids
public
array | array(int) ref_id |
Definition at line 601 of file class.ilAccessHandler.php.
References $ref_id, and ilCourseItems\_readActivationTimes().
Referenced by doActivationCheck().
ilAccessHandler::readCache | ( | $a_secs = 0 | ) |
Definition at line 146 of file class.ilAccessHandler.php.
References DB_FETCHMODE_ASSOC.
ilAccessHandler::setResults | ( | $a_results | ) |
Definition at line 171 of file class.ilAccessHandler.php.
ilAccessHandler::storeAccessResult | ( | $a_permission, | |
$a_cmd, | |||
$a_ref_id, | |||
$a_access_granted, | |||
$a_user_id = "" , |
|||
$a_info = "" |
|||
) |
store access result
private
string | $a_permission | permission |
string | $a_cmd | command string |
int | $a_ref_id | reference id |
boolean | $a_access_granted | true if access is granted |
int | $a_user_id | user id (if no id passed, current user id) |
Definition at line 75 of file class.ilAccessHandler.php.
Referenced by checkAccessOfUser(), doRBACCheck(), doStatusCheck(), and doTreeCheck().
ilAccessHandler::storeCache | ( | ) |
Definition at line 136 of file class.ilAccessHandler.php.