ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjTestVerificationAccess.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
26{
27 public static function _getCommands(): array
28 {
29 $commands = [];
30 $commands[] = ['permission' => 'read', 'cmd' => 'view', 'lang_var' => 'show', 'default' => true];
31 return $commands;
32 }
33
34 public static function _checkGoto($a_target): bool
35 {
36 global $DIC;
37 $ilAccess = $DIC['ilAccess'];
38
39 $t_arr = explode('_', $a_target);
40
41 // #11021
42 // personal workspace context: do not force normal login
43 if (isset($t_arr[2]) && $t_arr[2] === 'wsp') {
44 return ilSharedResourceGUI::hasAccess((int) $t_arr[1]);
45 }
46
47 if ($ilAccess->checkAccess('read', '', (int) $t_arr[1])) {
48 return true;
49 }
50
51 return false;
52 }
53}
Class ilObjTestVerificationAccess.
Class ilObjectAccess.
static hasAccess(int $a_node_id, bool $a_is_portfolio=false)
global $DIC
Definition: shib_login.php:26