ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
class.ilObjBlogAccess.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once("./Services/Object/classes/class.ilObjectAccess.php");
6
15{
28 function _getCommands()
29 {
30 $commands = array
31 (
32 array("permission" => "read", "cmd" => "preview", "lang_var" => "show", "default" => true),
33 array("permission" => "write", "cmd" => "render", "lang_var" => "edit"),
34 array("permission" => "contribute", "cmd" => "render", "lang_var" => "edit"),
35 array("permission" => "write", "cmd" => "export", "lang_var" => "export_html")
36 );
37
38 return $commands;
39 }
40
44 function _checkGoto($a_target)
45 {
46 global $ilAccess;
47
48 $t_arr = explode("_", $a_target);
49
50 if(substr($a_target, -3) == "wsp")
51 {
52 include_once "Services/PersonalWorkspace/classes/class.ilSharedResourceGUI.php";
53 return ilSharedResourceGUI::hasAccess($t_arr[1]);
54 }
55
56 if ($t_arr[0] != "blog" || ((int) $t_arr[1]) <= 0)
57 {
58 return false;
59 }
60
61 // #12648
62 if ($ilAccess->checkAccess("read", "", $t_arr[1]))
63 {
64 return true;
65 }
66 return false;
67 }
68}
69
70?>
Class ilObjBlogAccess.
_getCommands()
get commands
_checkGoto($a_target)
check whether goto script will succeed
Class ilObjectAccess.
static hasAccess($a_node_id, $a_is_portfolio=false)