ILIAS
Release_4_4_x_branch Revision 61816
|
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 | |
setPreventCachingLastResult ($a_val) | |
Set prevent caching last result. | |
getPreventCachingLastResult () | |
Get prevent caching last 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, $a_type) | |
rbac check for current object -> type should be used for create permission | |
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 | |
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 | |
doLicenseCheck ($a_permission, $a_cmd, $a_ref_id, $a_user_id, $a_obj_id, $a_type) | |
check for available licenses | |
clear () | |
enable ($a_str, $a_bool) |
Protected Attributes | |
$stored_rbac_access = array() |
Class ilAccessHandler.
Checks access for ILIAS objects
Definition at line 20 of file class.ilAccessHandler.php.
ilAccessHandler::addInfoItem | ( | $a_type, | |
$a_text, | |||
$a_data = "" |
|||
) |
add an info item to current info object
Definition at line 189 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 206 of file class.ilAccessHandler.php.
References $ilUser, and 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 226 of file class.ilAccessHandler.php.
References $ilBench, $lng, ilObject\_lookupObjId(), ilObject\_lookupType(), doActivationCheck(), doCacheCheck(), doConditionCheck(), doLicenseCheck(), doPathCheck(), doRBACCheck(), doStatusCheck(), doTreeCheck(), IL_NO_PERMISSION, setPreventCachingLastResult(), and storeAccessResult().
Referenced by checkAccess(), doActivationCheck(), doConditionCheck(), and doPathCheck().
ilAccessHandler::clear | ( | ) |
Definition at line 776 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 567 of file class.ilAccessHandler.php.
References $ilBench, $ilUser, checkAccessOfUser(), ilMemberViewSettings\getInstance(), ilObjectActivation\getItem(), and ilObjectActivation\TIMINGS_ACTIVATION.
Referenced by checkAccessOfUser().
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 384 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 650 of file class.ilAccessHandler.php.
References $ilBench, $lng, ilConditionHandler\_checkAllConditionsOfTarget(), ilConditionHandler\_getConditionsOfTarget(), ilObject\_lookupTitle(), checkAccessOfUser(), and IL_MISSING_PRECONDITION.
Referenced by checkAccessOfUser().
ilAccessHandler::doLicenseCheck | ( | $a_permission, | |
$a_cmd, | |||
$a_ref_id, | |||
$a_user_id, | |||
$a_obj_id, | |||
$a_type | |||
) |
check for available licenses
Definition at line 729 of file class.ilAccessHandler.php.
References $lng, ilLicenseAccess\_checkAccess(), ilLicenseAccess\_isEnabled(), IL_NO_LICENSE, and storeAccessResult().
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 520 of file class.ilAccessHandler.php.
References $ilBench, $lng, $path, checkAccessOfUser(), and IL_NO_PARENT_ACCESS.
Referenced by checkAccessOfUser().
ilAccessHandler::doRBACCheck | ( | $a_permission, | |
$a_cmd, | |||
$a_ref_id, | |||
$a_user_id, | |||
$a_type | |||
) |
rbac check for current object -> type should be used for create permission
Definition at line 471 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 683 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 411 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 783 of file class.ilAccessHandler.php.
ilAccessHandler::getInfo | ( | ) |
get last info object
Definition at line 354 of file class.ilAccessHandler.php.
ilAccessHandler::getPreventCachingLastResult | ( | ) |
Get prevent caching last result.
Definition at line 104 of file class.ilAccessHandler.php.
Referenced by storeAccessResult().
ilAccessHandler::getResultAll | ( | $a_ref_id = "" | ) |
Definition at line 370 of file class.ilAccessHandler.php.
References $results.
ilAccessHandler::getResultLast | ( | ) |
get last info object
Definition at line 365 of file class.ilAccessHandler.php.
ilAccessHandler::getResults | ( | ) |
Definition at line 176 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 121 of file class.ilAccessHandler.php.
References $ilUser.
Referenced by doCacheCheck().
ilAccessHandler::ilAccessHandler | ( | ) |
constructor
Definition at line 27 of file class.ilAccessHandler.php.
References $lng.
ilAccessHandler::readCache | ( | $a_secs = 0 | ) |
Definition at line 156 of file class.ilAccessHandler.php.
References $ilUser, $query, and DB_FETCHMODE_ASSOC.
ilAccessHandler::setPreventCachingLastResult | ( | $a_val | ) |
Set prevent caching last result.
boolean | true if last result should not be cached |
Definition at line 94 of file class.ilAccessHandler.php.
Referenced by checkAccessOfUser().
ilAccessHandler::setResults | ( | $a_results | ) |
Definition at line 181 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 57 of file class.ilAccessHandler.php.
References $ilUser, and getPreventCachingLastResult().
Referenced by checkAccessOfUser(), doLicenseCheck(), doRBACCheck(), doStatusCheck(), and doTreeCheck().
ilAccessHandler::storeCache | ( | ) |
|
protected |
Definition at line 22 of file class.ilAccessHandler.php.