ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilObjBlogAccess Class Reference

Class ilObjBlogAccess. More...

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

Public Member Functions

 _getCommands ()
 get commands More...
 
 _checkGoto ($a_target)
 check whether goto script will succeed More...
 
 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...
 
 _getCommands ()
 get commands More...
 
 _checkGoto ($a_target)
 check whether goto script will succeed More...
 
 _preloadData ($a_obj_ids, $a_ref_ids)
 Preload data. More...
 
 canBeDelivered (ilWACPath $ilWACPath)
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectAccess
static _isOffline ($a_obj_id)
 Type-specific implementation of general status, has to be overwritten. 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()

ilObjBlogAccess::_checkGoto (   $a_target)

check whether goto script will succeed

Reimplemented from ilObjectAccess.

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

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

References ilSharedResourceGUI\hasAccess().

+ Here is the call graph for this function:

◆ _getCommands()

ilObjBlogAccess::_getCommands ( )

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" => "export", "lang_var" => "export_html")
37 );
38
39 return $commands;
40 }

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 75 of file class.ilObjBlogAccess.php.

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

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: