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

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilObjOrgUnitAccess:
+ Collaboration diagram for ilObjOrgUnitAccess:

Static Public Member Functions

static _getCommands ()
 get commands this method returns an array of all possible commands/permission combinations example: $commands = array ( array('permission' => 'read', 'cmd' => 'view', 'lang_var' => 'show'), array('permission' => 'write', 'cmd' => 'edit', 'lang_var' => 'edit'), ); More...
 
static _checkAccessStaff (int $ref_id)
 
static _checkAccessSettings (int $ref_id)
 
static _checkAccessExport (int $ref_id)
 
static _checkAccessTypes (int $ref_id)
 
static _checkAccessPositions (int $ref_id)
 
static _checkAccessStaffRec (int $ref_id)
 
static _checkAccessAdministrateUsers (int $ref_id)
 
static _checkAccessToUserLearningProgress (int $ref_id, int $usr_id)
 
static _checkGoto (string $a_target)
 
- 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...
 

Additional Inherited Members

- 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)
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilObjOrgUnitAccess

Author
: Oskar Truffer ot@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
: Martin Studer ms@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

Definition at line 25 of file class.ilObjOrgUnitAccess.php.

Member Function Documentation

◆ _checkAccessAdministrateUsers()

static ilObjOrgUnitAccess::_checkAccessAdministrateUsers ( int  $ref_id)
static

Definition at line 97 of file class.ilObjOrgUnitAccess.php.

References $DIC, and ilUserAccountSettings\getInstance().

Referenced by ilObjOrgUnitGUI\executeCommand(), and ilObjOrgUnitGUI\getTabs().

97  : bool
98  {
99  global $DIC;
100 
101  return ilUserAccountSettings::getInstance()->isLocalUserAdministrationEnabled()
102  && $DIC->access()->checkAccess('cat_administrate_users', '', $ref_id);
103  }
global $DIC
Definition: feed.php:28
$ref_id
Definition: ltiauth.php:67
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _checkAccessExport()

static ilObjOrgUnitAccess::_checkAccessExport ( int  $ref_id)
static

Definition at line 67 of file class.ilObjOrgUnitAccess.php.

References $DIC.

Referenced by ilObjOrgUnitGUI\executeCommand().

67  : bool
68  {
69  global $DIC;
70 
71  return $DIC->access()->checkAccess('write', '', $ref_id);
72  }
global $DIC
Definition: feed.php:28
$ref_id
Definition: ltiauth.php:67
+ Here is the caller graph for this function:

◆ _checkAccessPositions()

static ilObjOrgUnitAccess::_checkAccessPositions ( int  $ref_id)
static

Definition at line 81 of file class.ilObjOrgUnitAccess.php.

References $DIC.

Referenced by ilOrgUnitPositionGUI\__construct(), and ilOrgUnitUserAssignmentGUI\executeCommand().

81  : bool
82  {
83  global $DIC;
84 
85  return $DIC->access()->checkAccess('write', '', $ref_id);
86  }
global $DIC
Definition: feed.php:28
$ref_id
Definition: ltiauth.php:67
+ Here is the caller graph for this function:

◆ _checkAccessSettings()

static ilObjOrgUnitAccess::_checkAccessSettings ( int  $ref_id)
static

Definition at line 60 of file class.ilObjOrgUnitAccess.php.

References $DIC.

Referenced by ilOrgUnitGlobalSettingsGUI\__construct(), and ilObjOrgUnitGUI\getTabs().

60  : bool
61  {
62  global $DIC;
63 
64  return $DIC->access()->checkAccess('write', '', $ref_id);
65  }
global $DIC
Definition: feed.php:28
$ref_id
Definition: ltiauth.php:67
+ Here is the caller graph for this function:

◆ _checkAccessStaff()

static ilObjOrgUnitAccess::_checkAccessStaff ( int  $ref_id)
static

Definition at line 51 of file class.ilObjOrgUnitAccess.php.

References $DIC.

Referenced by ilObjOrgUnitGUI\getTabs(), ilOrgUnitRecursiveUserAssignmentTableGUI\loadData(), and ilOrgUnitStaffGUI\showStaff().

51  : bool
52  {
53  global $DIC;
54 
55  return ($DIC->access()->checkAccess('write', '', $ref_id)
56  || $DIC->access()->checkAccess('view_learning_progress', '', $ref_id))
57  && $DIC->access()->checkAccess('read', '', $ref_id);
58  }
global $DIC
Definition: feed.php:28
$ref_id
Definition: ltiauth.php:67
+ Here is the caller graph for this function:

◆ _checkAccessStaffRec()

static ilObjOrgUnitAccess::_checkAccessStaffRec ( int  $ref_id)
static

Definition at line 88 of file class.ilObjOrgUnitAccess.php.

References $DIC.

Referenced by ilOrgUnitRecursiveUserAssignmentTableGUI\loadData(), and ilOrgUnitStaffGUI\showStaffRec().

88  : bool
89  {
90  global $DIC;
91 
92  return ($DIC->access()->checkAccess('write', '', $ref_id)
93  || $DIC->access()->checkAccess('view_learning_progress_rec', '', $ref_id))
94  && $DIC->access()->checkAccess('read', '', $ref_id);
95  }
global $DIC
Definition: feed.php:28
$ref_id
Definition: ltiauth.php:67
+ Here is the caller graph for this function:

◆ _checkAccessToUserLearningProgress()

static ilObjOrgUnitAccess::_checkAccessToUserLearningProgress ( int  $ref_id,
int  $usr_id 
)
static

Definition at line 105 of file class.ilObjOrgUnitAccess.php.

References $DIC, and ilObjOrgUnitTree\_getInstance().

Referenced by ilLPListOfProgressGUI\__initUser(), and ilObjOrgUnitGUI\executeCommand().

105  : bool
106  {
107  global $DIC;
108 
109  //Permission to view the Learning Progress of an OrgUnit: Employees
110  if ($DIC->access()->checkAccess('view_learning_progress', '', $ref_id)
111  && in_array($usr_id, ilObjOrgUnitTree::_getInstance()->getEmployees($ref_id, false))
112  ) {
113  return true;
114  }
115  //Permission to view the Learning Progress of an OrgUnit: Superiors
116  if ($DIC->access()->checkAccess('view_learning_progress', '', $ref_id)
117  && in_array($usr_id, ilObjOrgUnitTree::_getInstance()->getSuperiors($ref_id, false))
118  ) {
119  return true;
120  }
121 
122  //Permission to view the Learning Progress of an OrgUnit or SubOrgUnit!: Employees
123  if ($DIC->access()->checkAccess('view_learning_progress_rec', '', $ref_id)
124  && in_array($usr_id, ilObjOrgUnitTree::_getInstance()->getEmployees($ref_id, true))
125  ) {
126  return true;
127  }
128 
129  //Permission to view the Learning Progress of an OrgUnit or SubOrgUnit!: Superiors
130  if ($DIC->access()->checkAccess('view_learning_progress_rec', '', $ref_id)
131  && in_array($usr_id, ilObjOrgUnitTree::_getInstance()->getSuperiors($ref_id, true))
132  ) {
133  return true;
134  }
135 
136  return false;
137  }
global $DIC
Definition: feed.php:28
$ref_id
Definition: ltiauth.php:67
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _checkAccessTypes()

static ilObjOrgUnitAccess::_checkAccessTypes ( int  $ref_id)
static

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

References $DIC.

74  : bool
75  {
76  global $DIC;
77 
78  return $DIC->access()->checkAccess('write', '', $ref_id);
79  }
global $DIC
Definition: feed.php:28
$ref_id
Definition: ltiauth.php:67

◆ _checkGoto()

static ilObjOrgUnitAccess::_checkGoto ( string  $a_target)
static

Definition at line 140 of file class.ilObjOrgUnitAccess.php.

References $DIC.

140  : bool
141  {
142  global $DIC;
143 
144  $t_arr = explode('_', $a_target);
145  if ($t_arr[0] !== 'orgu' || ((int) $t_arr[1]) <= 0) {
146  return false;
147  }
148  if ($DIC->access()->checkAccess('read', '', $t_arr[1])) {
149  return true;
150  }
151 
152  return false;
153  }
global $DIC
Definition: feed.php:28

◆ _getCommands()

static ilObjOrgUnitAccess::_getCommands ( )
static

get commands this method returns an array of all possible commands/permission combinations example: $commands = array ( array('permission' => 'read', 'cmd' => 'view', 'lang_var' => 'show'), array('permission' => 'write', 'cmd' => 'edit', 'lang_var' => 'edit'), );

Definition at line 37 of file class.ilObjOrgUnitAccess.php.

Referenced by ilObjOrgUnitListGUI\init().

37  : array
38  {
39  $commands = [
40  [
41  'permission' => 'read',
42  'cmd' => 'view',
43  'lang_var' => 'show',
44  'default' => true,
45  ],
46  ];
47 
48  return $commands;
49  }
+ Here is the caller graph for this function:

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