ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjChatroomAccess Class Reference

Access class for chatroom objects. More...

+ Inheritance diagram for ilObjChatroomAccess:
+ Collaboration diagram for ilObjChatroomAccess:

Public Member Functions

 _getCommands ()
 This method returns an array of all possible commands/permission combinations. More...
 
 _checkAccess ($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="")
 
- 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=0)
 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...
 

Static Private Attributes

static $chat_enabled = null
 

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

Access class for chatroom objects.

Author
Jan Posselt <jposselt at databay.de>
Version
$Id$

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

Member Function Documentation

◆ _checkAccess()

ilObjChatroomAccess::_checkAccess (   $a_cmd,
  $a_permission,
  $a_ref_id,
  $a_obj_id,
  $a_user_id = "" 
)

Definition at line 74 of file class.ilObjChatroomAccess.php.

References $ilUser.

75  {
76  global $ilUser, $rbacsystem;
77 
78  if (self::$chat_enabled === null) {
79  $chatSetting = new ilSetting('chatroom');
80  self::$chat_enabled = (boolean) $chatSetting->get('chat_enabled');
81  }
82 
83  if ($a_user_id == "")
84  {
85  $a_user_id = $ilUser->getId();
86  }
87 
88  if ($rbacsystem->checkAccessOfUser($a_user_id, 'write', $a_ref_id)) {
89  return true;
90  }
91  return self::$chat_enabled;
92  }
ILIAS Setting Class.
global $ilUser
Definition: imgupload.php:15

◆ _getCommands()

ilObjChatroomAccess::_getCommands ( )

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"), );

Returns
string

Definition at line 30 of file class.ilObjChatroomAccess.php.

References ilObjectAccess\_checkGoto().

Referenced by ilObjChatroomListGUI\init().

31  {
32  $commands = array();
33  $commands[] = array("permission" => "read", "cmd" => "view", "lang_var" => "enter", "default" => true);
34  $commands[] = array("permission" => "write", "cmd" => "settings-general", "lang_var" => "settings");
35 
36  // alex 3 Oct 2012: this leads to a blank screen, i guess it is a copy/paste bug from files
37  //$commands[] = array("permission" => "write", "cmd" => "versions", "lang_var" => "versions");
38 
39  return $commands;
40  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $chat_enabled

ilObjChatroomAccess::$chat_enabled = null
staticprivate

Definition at line 72 of file class.ilObjChatroomAccess.php.


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