00001 <?php 00002 /* 00003 +-----------------------------------------------------------------------------+ 00004 | ILIAS open source | 00005 +-----------------------------------------------------------------------------+ 00006 | Copyright (c) 1998-2006 ILIAS open source, University of Cologne | 00007 | | 00008 | This program is free software; you can redistribute it and/or | 00009 | modify it under the terms of the GNU General Public License | 00010 | as published by the Free Software Foundation; either version 2 | 00011 | of the License, or (at your option) any later version. | 00012 | | 00013 | This program is distributed in the hope that it will be useful, | 00014 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 00015 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 00016 | GNU General Public License for more details. | 00017 | | 00018 | You should have received a copy of the GNU General Public License | 00019 | along with this program; if not, write to the Free Software | 00020 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 00021 +-----------------------------------------------------------------------------+ 00022 */ 00023 00024 00037 class ilObjectAccess 00038 { 00054 function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id = "") 00055 { 00056 global $ilUser, $ilAccess; 00057 00058 if ($a_user_id == "") 00059 { 00060 $a_user_id = $ilUser->getId(); 00061 } 00062 00063 // add no access info item and return false if access is not granted 00064 // $ilAccess->addInfoItem(IL_NO_OBJECT_ACCESS, $a_text, $a_data = ""); 00065 // 00066 // for all RBAC checks use checkAccessOfUser instead the normal checkAccess-method: 00067 // $rbacsystem->checkAccessOfUser($a_user_id, $a_permission, $a_ref_id) 00068 00069 return true; 00070 } 00071 00077 function _checkCondition($a_obj_id, $a_operator, $a_value) 00078 { 00079 switch($a_operator) 00080 { 00081 default: 00082 return true; 00083 } 00084 } 00085 00098 function _getCommands() 00099 { 00100 $commands = array 00101 ( 00102 array() 00103 ); 00104 00105 return $commands; 00106 } 00107 00111 function _checkGoto($a_target) 00112 { 00113 global $ilAccess; 00114 00115 $t_arr = explode("_", $a_target); 00116 00117 if ($ilAccess->checkAccess("read", "", $t_arr[1])) 00118 { 00119 return true; 00120 } 00121 return false; 00122 } 00123 00124 } 00125 00126 ?>