ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilObjWorkflowEngineAccess.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */
3
5require_once './Services/Object/classes/class.ilObjectAccess.php';
6
17{
30 public function _checkAccess($cmd, $permission, $ref_id, $a_obj_id, $user_id = "")
31 {
32 global $DIC;
33 $rbacsystem = $DIC['rbacsystem'];
34 $lng = $DIC['lng'];
35 $ilUser = $DIC['ilUser'];
36 $ilAccess = $DIC['ilAccess'];
37
38 if ($user_id == "")
39 {
40 $user_id = $ilUser->getId();
41 }
42
43 // Deal with commands
44 switch ($cmd)
45 {
46 case "view":
47 $ilAccess->addInfoItem(IL_NO_OBJECT_ACCESS, $lng->txt("crs_status_blocked"));
48 return false;
49 break;
50
51 case 'leave':
52 }
53
54 // Deal with permissions
55 switch ($permission)
56 {
57 case 'visible':
58 return $rbacsystem->checkAccessOfUser($user_id, 'visible', $ref_id);
59 break;
60
61 case 'read':
62 return $rbacsystem->checkAccessOfUser($user_id, 'write', $ref_id);
63 break;
64 }
65
66 return true; // ORLY?
67 }
68
74 public static function _checkGoto($target)
75 {
76 //$workflow = substr($params, 2, strpos($params,'EVT')-2);
77 //$event = substr($params, strpos($params, 'EVT')+3);
78 return true; // TODO Validate Event Syntax
79 }
80}
An exception for terminatinating execution or to throw for unit testing.
const IL_NO_OBJECT_ACCESS
@noinspection PhpIncludeInspection
_checkAccess($cmd, $permission, $ref_id, $a_obj_id, $user_id="")
checks wether a user may invoke a command or not (this method is called by ilAccessHandler::checkAcce...
Class ilObjectAccess.
global $lng
Definition: privfeed.php:17
$cmd
Definition: sahs_server.php:35
$ref_id
Definition: sahs_server.php:39
global $DIC
$ilUser
Definition: imgupload.php:18