ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilObjBlogAccess Class Reference

Class ilObjBlogAccess. More...

+ Inheritance diagram for ilObjBlogAccess:
+ Collaboration diagram for ilObjBlogAccess:

Public Member Functions

 canBeDelivered (ilWACPath $ilWACPath)
 
- Public Member Functions inherited from ilObjectAccess
 _checkAccess ($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="")
 Checks wether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess) More...
 
 _checkCondition ($a_obj_id, $a_operator, $a_value, $a_usr_id)
 check condition More...
 
 canBeDelivered (ilWACPath $ilWACPath)
 

Static Public Member Functions

static _getCommands ()
 get commands More...
 
static _checkGoto ($a_target)
 check whether goto script will succeed More...
 
- Static Public Member Functions inherited from ilObjectAccess
static _getCommands ()
 get commands More...
 
static _checkGoto ($a_target)
 check whether goto script will succeed More...
 
static _isOffline ($a_obj_id)
 Type-specific implementation of general status, has to be overwritten. More...
 
static _preloadData ($a_obj_ids, $a_ref_ids)
 Preload data. More...
 

Detailed Description

Class ilObjBlogAccess.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
Id
class.ilObjRootFolderAccess.php 15678 2008-01-06 20:40:55Z akill

Definition at line 15 of file class.ilObjBlogAccess.php.

Member Function Documentation

◆ _checkGoto()

static ilObjBlogAccess::_checkGoto (   $a_target)
static

check whether goto script will succeed

Reimplemented from ilObjectAccess.

Definition at line 46 of file class.ilObjBlogAccess.php.

47 {
48 global $ilAccess;
49
50 $t_arr = explode("_", $a_target);
51
52 if(substr($a_target, -3) == "wsp")
53 {
54 include_once "Services/PersonalWorkspace/classes/class.ilSharedResourceGUI.php";
55 return ilSharedResourceGUI::hasAccess($t_arr[1]);
56 }
57
58 if ($t_arr[0] != "blog" || ((int) $t_arr[1]) <= 0)
59 {
60 return false;
61 }
62
63 // #12648
64 if ($ilAccess->checkAccess("read", "", $t_arr[1]))
65 {
66 return true;
67 }
68 return false;
69 }
static hasAccess($a_node_id, $a_is_portfolio=false)

References ilSharedResourceGUI\hasAccess().

+ Here is the call graph for this function:

◆ _getCommands()

static ilObjBlogAccess::_getCommands ( )
static

get commands

this method returns an array of all possible commands/permission combinations

example:
$commands = array ( array("permission" => "read", "cmd" => "view", "lang_var" => "show"), array("permission" => "write", "cmd" => "edit", "lang_var" => "edit"), );

Reimplemented from ilObjectAccess.

Definition at line 29 of file class.ilObjBlogAccess.php.

30 {
31 $commands = array
32 (
33 array("permission" => "read", "cmd" => "preview", "lang_var" => "show", "default" => true),
34 array("permission" => "write", "cmd" => "render", "lang_var" => "edit"),
35 array("permission" => "contribute", "cmd" => "render", "lang_var" => "edit"),
36 array("permission" => "write", "cmd" => "edit", "lang_var" => "settings"),
37 array("permission" => "write", "cmd" => "export", "lang_var" => "export_html")
38 );
39
40 return $commands;
41 }

Referenced by ilObjBlogListGUI\init().

+ Here is the caller graph for this function:

◆ canBeDelivered()

ilObjBlogAccess::canBeDelivered ( ilWACPath  $ilWACPath)
Parameters
ilWACPath$ilWACPath
Returns
bool

Implements ilWACCheckingClass.

Definition at line 76 of file class.ilObjBlogAccess.php.

76 {
77 global $ilUser, $ilAccess;
78
79 if(preg_match("/\\/blog_([\\d]*)\\//uism", $ilWACPath->getPath(), $results))
80 {
81 $obj_id = $results[1];
82
83 // personal workspace
84 include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
85 $tree = new ilWorkspaceTree(0);
86 $node_id = $tree->lookupNodeId($obj_id);
87 if($node_id)
88 {
89 include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
90 $access_handler = new ilWorkspaceAccessHandler($tree);
91 if ($access_handler->checkAccessOfUser($tree, $ilUser->getId(), "read", "view", $node_id, "blog")) {
92 return true;
93 }
94 }
95 // repository (RBAC)
96 else
97 {
98 $ref_ids = ilObject::_getAllReferences($obj_id);
99 foreach($ref_ids as $ref_id)
100 {
101 if ($ilAccess->checkAccessOfUser($ilUser->getId(), "read", "view", $ref_id, "blog", $obj_id))
102 {
103 return true;
104 }
105 }
106 }
107 }
108
109 return false;
110 }
static _getAllReferences($a_id)
get all reference ids of object
Access handler for personal workspace.
Tree handler for personal workspace.
$ref_id
Definition: sahs_server.php:39
$results
$ilUser
Definition: imgupload.php:18

References $ilUser, $ref_id, $results, ilObject\_getAllReferences(), and ilWACPath\getPath().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: