| ILIAS
    Release_4_1_x_branch Revision 61804
    | 
Class ilWebAccessChecker. More...
 Collaboration diagram for ilWebAccessChecker:
 Collaboration diagram for ilWebAccessChecker:| Public Member Functions | |
| ilWebAccessChecker () | |
| Constructor  public. | |
| determineUser () | |
| Determine the current user(s) | |
| checkAccess () | |
| Check access rights of the requested file  public. | |
| 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. | |
| sendFileVirtual () | |
| Send the requested file by apache web server via virtual function. | |
| 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. | |
| 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 54 of file class.ilWebAccessChecker.php.
| ilWebAccessChecker::checkAccess | ( | ) | 
Check access rights of the requested file public.
Definition at line 272 of file class.ilWebAccessChecker.php.
References $ilLog, ilObjMediaCastAccess\_lookupPublicFiles(), ilNewsItem\_lookupVisibility(), checkAccessGlossaryTerm(), checkAccessLM(), checkAccessObject(), checkAccessTestQuestion(), checkAccessUserImage(), determineUser(), ilObjMediaObject\getParentObjectIdForUsage(), ilObjMediaObject\lookupUsages(), and NEWS_PUBLIC.
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | 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 550 of file class.ilWebAccessChecker.php.
References ilInternalLink\_getSourcesOfTarget(), ilLMObject\_lookupContObjID(), ilGlossaryDefinition\_lookupTermId(), and checkAccessObject().
Referenced by checkAccess().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | 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 439 of file class.ilWebAccessChecker.php.
References $lng, $ref_id, and ilObject\_getAllReferences().
Referenced by checkAccess().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Check access rights for an object by its object id.
| int | object id | 
Definition at line 481 of file class.ilWebAccessChecker.php.
References $ilAccess, $ref_id, ilObject\_getAllReferences(), and ilObject\_lookupType().
Referenced by checkAccess(), checkAccessGlossaryTerm(), and checkAccessTestQuestion().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | 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 513 of file class.ilWebAccessChecker.php.
References $ilAccess, $tests, ilObjTestAccess\_getRandomTestsForQuestionPool(), ilObject\_lookupType(), and checkAccessObject().
Referenced by checkAccess().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | 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 609 of file class.ilWebAccessChecker.php.
References $ilSetting, $usr_id, and ilObjUser\_lookupPref().
Referenced by checkAccess().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilWebAccessChecker::determineUser | ( | ) | 
Determine the current user(s)
Definition at line 211 of file class.ilWebAccessChecker.php.
References $_SESSION, $GLOBALS, ilSession\_getUsersWithIp(), and getCheckIp().
Referenced by checkAccess().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilWebAccessChecker::getCheckIp | ( | ) | 
Set the checking of the IP address of no valid session is found.
Definition at line 732 of file class.ilWebAccessChecker.php.
References $check_ip.
Referenced by determineUser().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilWebAccessChecker::getDisposition | ( | ) | 
Get the delivery mode for the file.
Definition at line 672 of file class.ilWebAccessChecker.php.
References $disposition.
Referenced by sendFile().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilWebAccessChecker::getMimeType | ( | $default = 'application/octet-stream' | ) | 
Get the mime type of the requested file.
| string | default type | 
Definition at line 906 of file class.ilWebAccessChecker.php.
References $mimetype.
Referenced by sendFile(), and sendFileVirtual().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilWebAccessChecker::getSendMimetype | ( | ) | 
Get if mimetype should be sent for a virtual delivery.
Definition at line 705 of file class.ilWebAccessChecker.php.
References $send_mimetype.
Referenced by sendFile(), and sendFileVirtual().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilWebAccessChecker::ilWebAccessChecker | ( | ) | 
Constructor public.
Definition at line 142 of file class.ilWebAccessChecker.php.
References $_GET, $ilAccess, $ilLog, $lng, ILIAS_ABSOLUTE_PATH, ILIAS_WEB_DIR, setCheckIp(), setDisposition(), and setSendMimetype().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilWebAccessChecker::sendError | ( | ) | 
Send an error response for the requested file public.
Definition at line 844 of file class.ilWebAccessChecker.php.
References $ilSetting, $lng, $tpl, exit, and ilUtil\getImagePath().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilWebAccessChecker::sendFile | ( | ) | 
Send the requested file as if directly delivered from the web server public.
Definition at line 742 of file class.ilWebAccessChecker.php.
References ilUtil\deliverFile(), exit, getDisposition(), getMimeType(), getSendMimetype(), ilUtil\readFile(), and sendFileVirtual().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilWebAccessChecker::sendFileVirtual | ( | ) | 
Send the requested file by apache web server via virtual function.
The ILIAS "data" directory must have a "virtual-data" symbolic link Access to "virtual-data" should be protected by "Allow from env=ILIAS_CHECKED" The auto-generated headers should be unset by Apache for the WebAccessChecker directory
public
Definition at line 823 of file class.ilWebAccessChecker.php.
References exit, getMimeType(), and getSendMimetype().
Referenced by sendFile().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilWebAccessChecker::setCheckIp | ( | $a_check_ip | ) | 
Set the checking of the IP address if no valid session is found.
| boolean | public | 
Definition at line 716 of file class.ilWebAccessChecker.php.
Referenced by ilWebAccessChecker().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilWebAccessChecker::setDisposition | ( | $a_disposition | ) | 
Set the delivery mode for the file.
| string | "inline", "attachment" or "virtual" public | 
Definition at line 655 of file class.ilWebAccessChecker.php.
Referenced by ilWebAccessChecker().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilWebAccessChecker::setSendMimetype | ( | $a_send_mimetype | ) | 
Set the sending of the mime type.
| string | (boolean switch or mimetype) public | 
Definition at line 682 of file class.ilWebAccessChecker.php.
Referenced by ilWebAccessChecker().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilWebAccessChecker::$check_ip = false | 
Definition at line 93 of file class.ilWebAccessChecker.php.
Referenced by getCheckIp().
| ilWebAccessChecker::$check_users = array() | 
Definition at line 103 of file class.ilWebAccessChecker.php.
| ilWebAccessChecker::$disposition = "inline" | 
Definition at line 86 of file class.ilWebAccessChecker.php.
Referenced by getDisposition().
| ilWebAccessChecker::$errorcode | 
Definition at line 127 of file class.ilWebAccessChecker.php.
| ilWebAccessChecker::$errortext | 
Definition at line 135 of file class.ilWebAccessChecker.php.
| ilWebAccessChecker::$file | 
Definition at line 71 of file class.ilWebAccessChecker.php.
| ilWebAccessChecker::$ilAccess | 
Definition at line 57 of file class.ilWebAccessChecker.php.
Referenced by checkAccessObject(), checkAccessTestQuestion(), and ilWebAccessChecker().
| ilWebAccessChecker::$lng | 
Definition at line 56 of file class.ilWebAccessChecker.php.
Referenced by checkAccessLM(), ilWebAccessChecker(), and sendError().
| ilWebAccessChecker::$mimetype = null | 
Definition at line 119 of file class.ilWebAccessChecker.php.
Referenced by getMimeType().
| ilWebAccessChecker::$params | 
Definition at line 78 of file class.ilWebAccessChecker.php.
| ilWebAccessChecker::$send_mimetype = true | 
Definition at line 110 of file class.ilWebAccessChecker.php.
Referenced by getSendMimetype().
| ilWebAccessChecker::$subpath | 
Definition at line 64 of file class.ilWebAccessChecker.php.