1<?php 2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */ 3 4include_once("./Services/Object/classes/class.ilObjectAccess.php"); 5 6/** 7* Class ilObjTestVerificationAccess 8* 9* 10* @author Jörg Lützenkirchen <luetzenkirchen@leifos.com> 11* @version $Id$ 12* 13*/ 14class ilObjTestVerificationAccess extends ilObjectAccess 15{ 16 /** 17 * get commands 18 * 19 * this method returns an array of all possible commands/permission combinations 20 * 21 * example: 22 * $commands = array 23 * ( 24 * array("permission" => "read", "cmd" => "view", "lang_var" => "show"), 25 * array("permission" => "write", "cmd" => "edit", "lang_var" => "edit"), 26 * ); 27 */ 28 public static function _getCommands() 29 { 30 $commands = array(); 31 $commands[] = array("permission" => "read", "cmd" => "view", "lang_var" => "show", "default" => true); 32 return $commands; 33 } 34 35 public static function _checkGoto($a_target) 36 { 37 global $DIC; 38 $ilAccess = $DIC['ilAccess']; 39 40 $t_arr = explode("_", $a_target); 41 42 // #11021 43 // personal workspace context: do not force normal login 44 if (isset($t_arr[2]) && $t_arr[2] == "wsp") { 45 include_once "Services/PersonalWorkspace/classes/class.ilSharedResourceGUI.php"; 46 return ilSharedResourceGUI::hasAccess($t_arr[1]); 47 } 48 49 if ($ilAccess->checkAccess("read", "", $t_arr[1])) { 50 return true; 51 } 52 return false; 53 } 54} 55