ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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-patch fm
38 include_once './Services/WebServices/FileManager/classes/class.ilFMSettings.php';
39 if (ilFMSettings::getInstance()->isEnabled()) {
40 $commands[] = array(
41 'permission' => 'read',
42 'cmd' => 'fileManagerLaunch',
43 'lang_var' => 'fm_start',
44 'enable_anonymous' => false
45 );
46 }
47 // end-patch fm
48
49 // BEGIN WebDAV
50 require_once('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
52 include_once './Services/WebDAV/classes/class.ilWebDAVUtil.php';
53 if (ilWebDAVUtil::getInstance()->isLocalPasswordInstructionRequired()) {
54 $commands[] = array('permission' => 'read', 'cmd' => 'showPasswordInstruction', 'lang_var' => 'mount_webfolder', 'enable_anonymous' => 'false');
55 } else {
56 $commands[] = array("permission" => "read", "cmd" => "mount_webfolder", "lang_var" => "mount_webfolder", "enable_anonymous" => "false");
57 }
58 }
59 // END WebDAV
60 $commands[] = array("permission" => "write", "cmd" => "enableAdministrationPanel", "lang_var" => "edit_content");
61 $commands[] = array("permission" => "write", "cmd" => "edit", "lang_var" => "settings");
62
63 return $commands;
64 }
65
69 public static function _checkGoto($a_target)
70 {
71 global $DIC;
72
73 $ilAccess = $DIC->access();
74
75 $t_arr = explode("_", $a_target);
76
77 if ($t_arr[0] != "cat" || ((int) $t_arr[1]) <= 0) {
78 return false;
79 }
80
81 if ($ilAccess->checkAccess("read", "", $t_arr[1]) ||
82 $ilAccess->checkAccess("visible", "", $t_arr[1])) {
83 return true;
84 }
85 return false;
86 }
87}
An exception for terminatinating execution or to throw for unit testing.
static getInstance()
Get singleton instance.
Class ilObjCategoryAccess.
static _getCommands()
get commands
static _checkGoto($a_target)
check whether goto script will succeed
Class ilObjectAccess.
static getInstance()
Get singleton instance.
$DIC
Definition: xapitoken.php:46