ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilObjWorkflowEngineAccess Class Reference

PhpIncludeInspection More...

+ Inheritance diagram for ilObjWorkflowEngineAccess:
+ Collaboration diagram for ilObjWorkflowEngineAccess:

Public Member Functions

 _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::checkAccess) More...
 
- Public Member Functions inherited from ilObjectAccess
 _checkAccess ($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="")
 Checks wether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess) More...
 
 _checkCondition ($a_obj_id, $a_operator, $a_value, $a_usr_id)
 check condition More...
 

Static Public Member Functions

static _checkGoto ($target)
 
- Static Public Member Functions inherited from ilObjectAccess
static _getCommands ()
 get commands More...
 
static _checkGoto ($a_target)
 check whether goto script will succeed More...
 
static _isOffline ($a_obj_id)
 Type-specific implementation of general status, has to be overwritten. More...
 
static _preloadData ($a_obj_ids, $a_ref_ids)
 Preload data. More...
 

Detailed Description

PhpIncludeInspection

Class ilObjWorkflowEngineAccess

Author
Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

/

Definition at line 16 of file class.ilObjWorkflowEngineAccess.php.

Member Function Documentation

◆ _checkAccess()

ilObjWorkflowEngineAccess::_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::checkAccess)

Parameters
string$cmdcommand (not permission!)
string$permissionpermission
int$ref_idreference id
int$a_obj_idobject id
int$user_iduser id (if not provided, current user is taken)
Returns
boolean true, if everything is ok

Definition at line 30 of file class.ilObjWorkflowEngineAccess.php.

References $DIC, $ilUser, $lng, and IL_NO_OBJECT_ACCESS.

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  }
global $DIC
Definition: saml.php:7
const IL_NO_OBJECT_ACCESS
$ilUser
Definition: imgupload.php:18
global $lng
Definition: privfeed.php:17

◆ _checkGoto()

static ilObjWorkflowEngineAccess::_checkGoto (   $target)
static
Parameters
string$target
Returns
bool

Definition at line 71 of file class.ilObjWorkflowEngineAccess.php.

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  }

The documentation for this class was generated from the following file: