ILIAS  trunk Revision v11.0_alpha-1846-g895b5f47236
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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 24 of file class.ilObjOrgUnitAccess.php.

Member Function Documentation

◆ _checkAccessAdministrateUsers()

static ilObjOrgUnitAccess::_checkAccessAdministrateUsers ( int  $ref_id)
static

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

References $DIC, and ilUserAccountSettings\getInstance().

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

96  : bool
97  {
98  global $DIC;
99 
100  return ilUserAccountSettings::getInstance()->isLocalUserAdministrationEnabled()
101  && $DIC->access()->checkAccess('cat_administrate_users', '', $ref_id);
102  }
$ref_id
Definition: ltiauth.php:65
global $DIC
Definition: shib_login.php:22
+ 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 66 of file class.ilObjOrgUnitAccess.php.

References $DIC.

Referenced by ilObjOrgUnitGUI\executeCommand().

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

◆ _checkAccessPositions()

static ilObjOrgUnitAccess::_checkAccessPositions ( int  $ref_id)
static

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

References $DIC.

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

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

◆ _checkAccessSettings()

static ilObjOrgUnitAccess::_checkAccessSettings ( int  $ref_id)
static

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

References $DIC.

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

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

◆ _checkAccessStaff()

static ilObjOrgUnitAccess::_checkAccessStaff ( int  $ref_id)
static

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

References $DIC.

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

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

◆ _checkAccessStaffRec()

static ilObjOrgUnitAccess::_checkAccessStaffRec ( int  $ref_id)
static

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

References $DIC.

Referenced by ilOrgUnitUserAssignmentGUI\assignmentsRecursive().

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

◆ _checkAccessToUserLearningProgress()

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

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

References $DIC, and ilObjOrgUnitTree\_getInstance().

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

104  : bool
105  {
106  global $DIC;
107 
108  //Permission to view the Learning Progress of an OrgUnit: Employees
109  if ($DIC->access()->checkAccess('view_learning_progress', '', $ref_id)
110  && in_array($usr_id, ilObjOrgUnitTree::_getInstance()->getEmployees($ref_id, false))
111  ) {
112  return true;
113  }
114  //Permission to view the Learning Progress of an OrgUnit: Superiors
115  if ($DIC->access()->checkAccess('view_learning_progress', '', $ref_id)
116  && in_array($usr_id, ilObjOrgUnitTree::_getInstance()->getSuperiors($ref_id, false))
117  ) {
118  return true;
119  }
120 
121  //Permission to view the Learning Progress of an OrgUnit or SubOrgUnit!: Employees
122  if ($DIC->access()->checkAccess('view_learning_progress_rec', '', $ref_id)
123  && in_array($usr_id, ilObjOrgUnitTree::_getInstance()->getEmployees($ref_id, true))
124  ) {
125  return true;
126  }
127 
128  //Permission to view the Learning Progress of an OrgUnit or SubOrgUnit!: Superiors
129  if ($DIC->access()->checkAccess('view_learning_progress_rec', '', $ref_id)
130  && in_array($usr_id, ilObjOrgUnitTree::_getInstance()->getSuperiors($ref_id, true))
131  ) {
132  return true;
133  }
134 
135  return false;
136  }
$ref_id
Definition: ltiauth.php:65
global $DIC
Definition: shib_login.php:22
+ 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 73 of file class.ilObjOrgUnitAccess.php.

References $DIC.

73  : bool
74  {
75  global $DIC;
76 
77  return $DIC->access()->checkAccess('write', '', $ref_id);
78  }
$ref_id
Definition: ltiauth.php:65
global $DIC
Definition: shib_login.php:22

◆ _checkGoto()

static ilObjOrgUnitAccess::_checkGoto ( string  $a_target)
static

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

References $DIC.

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

◆ _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 36 of file class.ilObjOrgUnitAccess.php.

Referenced by ilObjOrgUnitListGUI\init().

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

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