ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilObjCategoryAccess.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once("./Services/Object/classes/class.ilObjectAccess.php");
6
17{
18
31 public static function _getCommands()
32 {
33 $commands = array();
34 $commands[] = array("permission" => "read", "cmd" => "render", "lang_var" => "show", "default" => true);
35
36
37 // BEGIN WebDAV
38 require_once('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
40 include_once './Services/WebDAV/classes/class.ilWebDAVUtil.php';
41 if (ilWebDAVUtil::getInstance()->isLocalPasswordInstructionRequired()) {
42 $commands[] = array('permission' => 'read', 'cmd' => 'showPasswordInstruction', 'lang_var' => 'mount_webfolder', 'enable_anonymous' => 'false');
43 } else {
44 $commands[] = array("permission" => "read", "cmd" => "mount_webfolder", "lang_var" => "mount_webfolder", "enable_anonymous" => "false");
45 }
46 }
47 // END WebDAV
48 $commands[] = array("permission" => "write", "cmd" => "enableAdministrationPanel", "lang_var" => "edit_content");
49 $commands[] = array("permission" => "write", "cmd" => "edit", "lang_var" => "settings");
50
51 return $commands;
52 }
53
57 public static function _checkGoto($a_target)
58 {
59 global $DIC;
60
61 $ilAccess = $DIC->access();
62
63 $t_arr = explode("_", $a_target);
64
65 if ($t_arr[0] != "cat" || ((int) $t_arr[1]) <= 0) {
66 return false;
67 }
68
69 if ($ilAccess->checkAccess("read", "", $t_arr[1]) ||
70 $ilAccess->checkAccess("visible", "", $t_arr[1])) {
71 return true;
72 }
73 return false;
74 }
75}
An exception for terminatinating execution or to throw for unit testing.
Class ilObjCategoryAccess.
static _getCommands()
get commands
static _checkGoto($a_target)
check whether goto script will succeed
Class ilObjectAccess.
static getInstance()
Get singleton instance.
global $DIC
Definition: goto.php:24