ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjWorkflowEngineAccess Class Reference

Class ilObjWorkflowEngineAccess. More...

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

Public Member Functions

 _checkAccess (string $cmd, string $permission, int $ref_id, int $obj_id, ?int $user_id=null)
 checks whether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess) More...
 
- Public Member Functions inherited from ilObjectAccess
 _checkAccess (string $cmd, string $permission, int $ref_id, int $obj_id, ?int $user_id=null)
 Checks whether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess) More...
 
 canBeDelivered (ilWACPath $ilWACPath)
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectAccess
static _getCommands ()
 get commands More...
 
static _checkGoto (string $target)
 check whether goto script will succeed More...
 
static _isOffline (int $obj_id)
 Type-specific implementation of general status, has to be overwritten if object type does not support centralized offline handling. More...
 
static _preloadData (array $obj_ids, array $ref_ids)
 Preload data. More...
 

Detailed Description

Member Function Documentation

◆ _checkAccess()

ilObjWorkflowEngineAccess::_checkAccess ( string  $cmd,
string  $permission,
int  $ref_id,
int  $obj_id,
?int  $user_id = null 
)

checks whether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess)

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

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

32  : bool
33  {
34  global $DIC;
35  $rbacsystem = $DIC['rbacsystem'];
36  $lng = $DIC['lng'];
37  $ilUser = $DIC['ilUser'];
38  $ilAccess = $DIC['ilAccess'];
39 
40  if (is_null($user_id)) {
41  $user_id = $ilUser->getId();
42  }
43 
44  // Deal with commands
45  switch ($cmd) {
46  case "view":
47  $ilAccess->addInfoItem(ilAccessInfo::IL_NO_OBJECT_ACCESS, $lng->txt("crs_status_blocked"));
48  return false;
49 
50  case 'leave':
51  }
52 
53  // Deal with permissions
54  switch ($permission) {
55  case 'visible':
56  return $rbacsystem->checkAccessOfUser($user_id, 'visible', $ref_id);
57 
58  case 'read':
59  return $rbacsystem->checkAccessOfUser($user_id, 'write', $ref_id);
60  }
61 
62  return true; // ORLY?
63  }
$lng
global $DIC
Definition: feed.php:28
$ref_id
Definition: ltiauth.php:67
$ilUser
Definition: imgupload.php:34

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