ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 
5 require_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  $user_id = $ilUser->getId();
40  }
41 
42  // Deal with commands
43  switch ($cmd) {
44  case "view":
45  $ilAccess->addInfoItem(IL_NO_OBJECT_ACCESS, $lng->txt("crs_status_blocked"));
46  return false;
47  break;
48 
49  case 'leave':
50  }
51 
52  // Deal with permissions
53  switch ($permission) {
54  case 'visible':
55  return $rbacsystem->checkAccessOfUser($user_id, 'visible', $ref_id);
56  break;
57 
58  case 'read':
59  return $rbacsystem->checkAccessOfUser($user_id, 'write', $ref_id);
60  break;
61  }
62 
63  return true; // ORLY?
64  }
65 
71  public static function _checkGoto($target)
72  {
73  //$workflow = substr($params, 2, strpos($params,'EVT')-2);
74  //$event = substr($params, strpos($params, 'EVT')+3);
75  return true; // TODO Validate Event Syntax
76  }
77 }
_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...
global $DIC
Definition: saml.php:7
const IL_NO_OBJECT_ACCESS
$ilUser
Definition: imgupload.php:18
Class ilObjectAccess.
global $lng
Definition: privfeed.php:17