ILIAS
Release_5_0_x_branch Revision 61816
|
Class ilWebAccessChecker. More...
Public Member Functions | |
ilWebAccessChecker () | |
Constructor public. | |
determineUser () | |
Determine the current user(s) | |
checkAccess () | |
Check access rights of the requested file public. | |
checkAccessMob ($obj_id) | |
Check access to media object. | |
setDisposition ($a_disposition) | |
Set the delivery mode for the file. | |
getDisposition () | |
Get the delivery mode for the file. | |
setSendMimetype ($a_send_mimetype) | |
Set the sending of the mime type. | |
getSendMimetype () | |
Get if mimetype should be sent for a virtual delivery. | |
setCheckIp ($a_check_ip) | |
Set the checking of the IP address if no valid session is found. | |
getCheckIp () | |
Set the checking of the IP address of no valid session is found. | |
sendFile () | |
Send the requested file as if directly delivered from the web server public. | |
sendError () | |
Send an error response for the requested file public. | |
getMimeType ($default= 'application/octet-stream') | |
Get the mime type of the requested file. |
Data Fields | |
$lng | |
$ilAccess | |
$subpath | |
$file | |
$params | |
$disposition = "inline" | |
$check_ip = false | |
$check_users = array() | |
$send_mimetype = true | |
$mimetype = null | |
$errorcode | |
$errortext |
Private Member Functions | |
checkAccessLM ($obj_id, $obj_type, $page=0) | |
check access for ILIAS learning modules (obsolete, if checking of page conditions is not activated!) | |
checkAccessObject ($obj_id, $obj_type= '') | |
Check access rights for an object by its object id. | |
checkAccessTestQuestion ($obj_id, $usage_id=0) | |
Check access rights for a test question This checks also tests with random selection of questions. | |
checkAccessGlossaryTerm ($obj_id, $page_id) | |
Check access rights for glossary terms This checks also learning modules linking the term. | |
checkAccessPortfolioPage ($obj_id, $page_id) | |
Check access rights for portfolio pages. | |
checkAccessBlogPage ($obj_id, $page_id) | |
Check access rights for blog pages. | |
checkAccessLearningObjectivePage ($obj_id, $page_id) | |
checkAccessUserImage ($usr_id) | |
Check access rights for user images. |
Class ilWebAccessChecker.
Checks the access rights of a directly requested content file. Called from an alias or rewrite rule
Definition at line 56 of file class.ilWebAccessChecker.php.
ilWebAccessChecker::checkAccess | ( | ) |
Check access rights of the requested file public.
Definition at line 274 of file class.ilWebAccessChecker.php.
References $ilLog, $ilUser, $path, ilInitialisation\authenticate(), checkAccessMob(), checkAccessObject(), checkAccessUserImage(), determineUser(), IL_COMP_MODULE, IL_COMP_SERVICE, ilComponent\lookupId(), and ilObjMediaObject\lookupUsages().
|
private |
Check access rights for blog pages.
int | object id (glossary) |
int | page id (definition) |
Definition at line 820 of file class.ilWebAccessChecker.php.
References checkAccessObject().
|
private |
Check access rights for glossary terms This checks also learning modules linking the term.
int | object id (glossary) |
int | page id (definition) |
Definition at line 743 of file class.ilWebAccessChecker.php.
References ilInternalLink\_getSourcesOfTarget(), ilLMObject\_lookupContObjID(), ilGlossaryDefinition\_lookupTermId(), and checkAccessObject().
|
private |
Definition at line 847 of file class.ilWebAccessChecker.php.
References ilCourseObjective\_lookupContainerIdByObjectiveId(), and checkAccessObject().
|
private |
check access for ILIAS learning modules (obsolete, if checking of page conditions is not activated!)
int | object id |
string | object type |
int | page id |
Definition at line 630 of file class.ilWebAccessChecker.php.
References $lng, $ref_id, and ilObject\_getAllReferences().
ilWebAccessChecker::checkAccessMob | ( | $obj_id | ) |
Check access to media object.
@return |
Definition at line 452 of file class.ilWebAccessChecker.php.
References ilObjMediaObject\getParentObjectIdForUsage(), ilMediaPoolPage\lookupUsages(), and ilObjMediaObject\lookupUsages().
Referenced by checkAccess().
|
private |
Check access rights for an object by its object id.
int | object id |
Definition at line 674 of file class.ilWebAccessChecker.php.
References $ilAccess, $ref_id, ilObject\_getAllReferences(), and ilObject\_lookupType().
Referenced by checkAccess(), checkAccessBlogPage(), checkAccessGlossaryTerm(), checkAccessLearningObjectivePage(), and checkAccessTestQuestion().
|
private |
Check access rights for portfolio pages.
int | object id (glossary) |
int | page id (definition) |
Definition at line 799 of file class.ilWebAccessChecker.php.
|
private |
Check access rights for a test question This checks also tests with random selection of questions.
int | object id (question pool or test) |
int | usage id (not yet used) |
Definition at line 706 of file class.ilWebAccessChecker.php.
References $ilAccess, $tests, ilObjTestAccess\_getRandomTestsForQuestionPool(), ilObject\_lookupType(), and checkAccessObject().
|
private |
Check access rights for user images.
Due to privacy this will be checked for a truly identified user (IP based checking is not recommended user images)
int | usr_id |
Definition at line 864 of file class.ilWebAccessChecker.php.
References $ilSetting, $ilUser, and ilObjUser\_lookupPref().
Referenced by checkAccess().
ilWebAccessChecker::determineUser | ( | ) |
Determine the current user(s)
Definition at line 213 of file class.ilWebAccessChecker.php.
References $_SESSION, $GLOBALS, $ilUser, ilSession\_getUsersWithIp(), and getCheckIp().
Referenced by checkAccess().
ilWebAccessChecker::getCheckIp | ( | ) |
Set the checking of the IP address of no valid session is found.
Definition at line 987 of file class.ilWebAccessChecker.php.
References $check_ip.
Referenced by determineUser().
ilWebAccessChecker::getDisposition | ( | ) |
Get the delivery mode for the file.
Definition at line 927 of file class.ilWebAccessChecker.php.
References $disposition.
Referenced by sendFile().
ilWebAccessChecker::getMimeType | ( | $default = 'application/octet-stream' | ) |
Get the mime type of the requested file.
string | default type |
Definition at line 1181 of file class.ilWebAccessChecker.php.
References $mimetype.
Referenced by sendFile().
ilWebAccessChecker::getSendMimetype | ( | ) |
Get if mimetype should be sent for a virtual delivery.
Definition at line 960 of file class.ilWebAccessChecker.php.
References $send_mimetype.
Referenced by sendFile().
ilWebAccessChecker::ilWebAccessChecker | ( | ) |
Constructor public.
Definition at line 144 of file class.ilWebAccessChecker.php.
References $_GET, $ilAccess, $ilLog, $ilUser, $lng, ILIAS_ABSOLUTE_PATH, ILIAS_WEB_DIR, setCheckIp(), setDisposition(), and setSendMimetype().
ilWebAccessChecker::sendError | ( | ) |
Send an error response for the requested file public.
Definition at line 1117 of file class.ilWebAccessChecker.php.
References $ilSetting, $ilUser, $lng, $nd, $tpl, $txt, and exit.
ilWebAccessChecker::sendFile | ( | ) |
Send the requested file as if directly delivered from the web server public.
Definition at line 997 of file class.ilWebAccessChecker.php.
References ilUtil\deliverFile(), exit, getDisposition(), getMimeType(), getSendMimetype(), ilUtil\rangeDownload(), and ilUtil\readFile().
ilWebAccessChecker::setCheckIp | ( | $a_check_ip | ) |
Set the checking of the IP address if no valid session is found.
boolean | public |
Definition at line 971 of file class.ilWebAccessChecker.php.
Referenced by ilWebAccessChecker().
ilWebAccessChecker::setDisposition | ( | $a_disposition | ) |
Set the delivery mode for the file.
string | "inline", "attachment" or "virtual" public |
Definition at line 910 of file class.ilWebAccessChecker.php.
Referenced by ilWebAccessChecker().
ilWebAccessChecker::setSendMimetype | ( | $a_send_mimetype | ) |
Set the sending of the mime type.
string | (boolean switch or mimetype) public |
Definition at line 937 of file class.ilWebAccessChecker.php.
Referenced by ilWebAccessChecker().
ilWebAccessChecker::$check_ip = false |
Definition at line 95 of file class.ilWebAccessChecker.php.
Referenced by getCheckIp().
ilWebAccessChecker::$check_users = array() |
Definition at line 105 of file class.ilWebAccessChecker.php.
ilWebAccessChecker::$disposition = "inline" |
Definition at line 88 of file class.ilWebAccessChecker.php.
Referenced by getDisposition().
ilWebAccessChecker::$errorcode |
Definition at line 129 of file class.ilWebAccessChecker.php.
ilWebAccessChecker::$errortext |
Definition at line 137 of file class.ilWebAccessChecker.php.
ilWebAccessChecker::$file |
Definition at line 73 of file class.ilWebAccessChecker.php.
ilWebAccessChecker::$ilAccess |
Definition at line 59 of file class.ilWebAccessChecker.php.
Referenced by checkAccessObject(), checkAccessTestQuestion(), and ilWebAccessChecker().
ilWebAccessChecker::$lng |
Definition at line 58 of file class.ilWebAccessChecker.php.
Referenced by checkAccessLM(), ilWebAccessChecker(), and sendError().
ilWebAccessChecker::$mimetype = null |
Definition at line 121 of file class.ilWebAccessChecker.php.
Referenced by getMimeType().
ilWebAccessChecker::$params |
Definition at line 80 of file class.ilWebAccessChecker.php.
ilWebAccessChecker::$send_mimetype = true |
Definition at line 112 of file class.ilWebAccessChecker.php.
Referenced by getSendMimetype().
ilWebAccessChecker::$subpath |
Definition at line 66 of file class.ilWebAccessChecker.php.