/**
  * Initialisation
  */
 public function init()
 {
     $this->delete_enabled = true;
     $this->cut_enabled = true;
     $this->copy_enabled = true;
     $this->subscribe_enabled = true;
     $this->link_enabled = true;
     $this->payment_enabled = true;
     $this->info_screen_enabled = true;
     $this->type = "chtr";
     $this->gui_class_name = "ilobjchatroomgui";
     // general commands array
     include_once './Modules/Chatroom/classes/class.ilObjChatroomAccess.php';
     $this->commands = ilObjChatroomAccess::_getCommands();
 }
 function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id = "")
 {
     global $ilUser, $rbacsystem;
     if (self::$chat_enabled === null) {
         $chatSetting = new ilSetting('chatroom');
         self::$chat_enabled = (bool) $chatSetting->get('chat_enabled');
     }
     if ($a_user_id == "") {
         $a_user_id = $ilUser->getId();
     }
     if ($rbacsystem->checkAccessOfUser($a_user_id, 'write', $a_ref_id)) {
         return true;
     }
     return self::$chat_enabled;
 }