19 declare(strict_types=1);
    34         $commands[] = [
'permission' => 
'read', 
'cmd' => 
'view', 
'lang_var' => 
'enter', 
'default' => 
true];
    35         $commands[] = [
'permission' => 
'write', 
'cmd' => 
'settings-general', 
'lang_var' => 
'settings'];
    42         $t_arr = explode(
'_', $target);
    44         if (count($t_arr) < 2 || $t_arr[0] !== 
'chtr' || ((
int) $t_arr[1]) <= 0) {
    62         return self::checkRoomAccess($permission, $ref_id, $obj_id, (
int) 
$user_id);
    65     private static function checkRoomAccess(
string $a_permission, 
int $a_ref_id, 
int $a_obj_id, 
int $a_user_id): bool
    69         if (self::$chat_enabled === null) {
    71             self::$chat_enabled = (bool) $chatSetting->get(
'chat_enabled', 
'0');
    74         $hasWriteAccess = $DIC->rbac()->system()->checkAccessOfUser($a_user_id, 
'write', $a_ref_id);
    75         if ($hasWriteAccess) {
    79         switch ($a_permission) {
    82                 $is_online = self::lookupOnline($a_obj_id);
    84                     $DIC->access()->addInfoItem(
    86                         $DIC->language()->txt(
'offline')
    93         return self::$chat_enabled;
 static checkUserPermissions($permissions, int $ref_id, bool $send_info=true)
Checks user permissions by given array and ref_id. 
 
static lookupOnline(int $a_obj_id)
 
const IL_NO_OBJECT_ACCESS
 
static checkRoomAccess(string $a_permission, int $a_ref_id, int $a_obj_id, int $a_user_id)
 
static _checkGoto(string $target)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
_checkAccess(string $cmd, string $permission, int $ref_id, int $obj_id, ?int $user_id=null)
 
static lookupOfflineStatus(int $obj_id)
Lookup offline status using objectDataCache. 
 
Access class for chatroom objects. 
 
canBeDelivered(ilWACPath $ilWACPath)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static bool $chat_enabled