ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjChatroomAdminAccess.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
29{
30 public static function _getCommands(): array
31 {
32 $commands = [];
33 $commands[] = ['permission' => 'read', 'cmd' => 'view', 'lang_var' => 'enter', 'default' => true];
34 $commands[] = ['permission' => 'write', 'cmd' => 'edit', 'lang_var' => 'edit'];
35 $commands[] = ['permission' => 'write', 'cmd' => 'versions', 'lang_var' => 'versions'];
36
37 return $commands;
38 }
39
40 public static function _checkGoto(string $target): bool
41 {
42 global $DIC;
43
44 $t_arr = explode('_', $target);
45
46 if ($t_arr[0] !== 'chtr' || !isset($t_arr[1]) || ((int) $t_arr[1]) <= 0) {
47 return false;
48 }
49
50 if ($DIC->rbac()->system()->checkAccess('visible', (int) $t_arr[1])) {
51 return true;
52 }
53
54 return false;
55 }
56}
Class ilObjChatroomAdminAccess Access class for chatroom objects.
static _checkGoto(string $target)
check whether goto script will succeed
Class ilObjectAccess.
global $DIC
Definition: shib_login.php:26