ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilObjWorkflowEngineAccess Class Reference

@noinspection 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

@noinspection 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

Reimplemented from ilObjectAccess.

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

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 }
const IL_NO_OBJECT_ACCESS
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

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

◆ _checkGoto()

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

Reimplemented from ilObjectAccess.

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

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 }

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