ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjOrgUnitAccess Class Reference

Class ilObjOrgUnitAccess. More...

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

Static Public Member Functions

static _getCommands ()
 get commands More...
 
static _checkAccessStaff ($ref_id)
 
static _checkAccessSettings (int $ref_id)
 
static _checkAccessExport (int $ref_id)
 
static _checkAccessTypes (int $ref_id)
 
static _checkAccessPositions (int $ref_id)
 
static _checkAccessStaffRec ($ref_id)
 
static _checkAccessAdministrateUsers ($ref_id)
 
static _checkAccessToUserLearningProgress ($ref_id, $usr_id)
 
static _checkGoto ($a_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 if object type does not support centralized offline handling. More...
 
static _preloadData ($a_obj_ids, $a_ref_ids)
 Preload data. More...
 

Additional Inherited Members

- 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...
 
 canBeDelivered (ilWACPath $ilWACPath)
 
Parameters
ilWACPath$ilWACPath
Returns
bool
More...
 

Detailed Description

Member Function Documentation

◆ _checkAccessAdministrateUsers()

static ilObjOrgUnitAccess::_checkAccessAdministrateUsers (   $ref_id)
static
Parameters
integer$ref_id
Returns
bool

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

References $DIC, and ilUserAccountSettings\getInstance().

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

124  : bool
125  {
126  global $DIC;
127 
128  return ilUserAccountSettings::getInstance()->isLocalUserAdministrationEnabled()
129  && $DIC->access()->checkAccess('cat_administrate_users', '', $ref_id);
130  }
global $DIC
Definition: goto.php:24
static getInstance()
Singelton get instance.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _checkAccessExport()

static ilObjOrgUnitAccess::_checkAccessExport ( int  $ref_id)
static
Parameters
int$ref_id
Returns
bool

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

References $DIC.

Referenced by ilObjOrgUnitGUI\executeCommand().

72  : bool
73  {
74  global $DIC;
75 
76  return $DIC->access()->checkAccess('write', '', $ref_id);
77  }
global $DIC
Definition: goto.php:24
+ Here is the caller graph for this function:

◆ _checkAccessPositions()

static ilObjOrgUnitAccess::_checkAccessPositions ( int  $ref_id)
static
Parameters
int$ref_id
Returns
bool

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

References $DIC.

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

96  : bool
97  {
98  global $DIC;
99 
100  return $DIC->access()->checkAccess('write', '', $ref_id);
101  }
global $DIC
Definition: goto.php:24
+ Here is the caller graph for this function:

◆ _checkAccessSettings()

static ilObjOrgUnitAccess::_checkAccessSettings ( int  $ref_id)
static
Parameters
int$ref_id
Returns
bool

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: goto.php:24
+ Here is the caller graph for this function:

◆ _checkAccessStaff()

static ilObjOrgUnitAccess::_checkAccessStaff (   $ref_id)
static
Parameters
integer$ref_id
Returns
bool

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

References $DIC.

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

46  : bool
47  {
48  global $DIC;
49 
50  return ($DIC->access()->checkAccess('write', '', $ref_id)
51  || $DIC->access()->checkAccess('view_learning_progress', '', $ref_id))
52  && $DIC->access()->checkAccess('read', '', $ref_id);
53  }
global $DIC
Definition: goto.php:24
+ Here is the caller graph for this function:

◆ _checkAccessStaffRec()

static ilObjOrgUnitAccess::_checkAccessStaffRec (   $ref_id)
static
Parameters
integer$ref_id
Returns
bool

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

References $DIC.

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

109  : bool
110  {
111  global $DIC;
112 
113  return ($DIC->access()->checkAccess('write', '', $ref_id)
114  || $DIC->access()->checkAccess('view_learning_progress_rec', '', $ref_id))
115  && $DIC->access()->checkAccess('read', '', $ref_id);
116  }
global $DIC
Definition: goto.php:24
+ Here is the caller graph for this function:

◆ _checkAccessToUserLearningProgress()

static ilObjOrgUnitAccess::_checkAccessToUserLearningProgress (   $ref_id,
  $usr_id 
)
static
Parameters
integer$ref_id
integer$usr_id
Returns
bool

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

References $DIC, and ilObjOrgUnitTree\_getInstance().

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

139  : bool
140  {
141  global $DIC;
142 
143  //Permission to view the Learning Progress of an OrgUnit: Employees
144  if ($DIC->access()->checkAccess('view_learning_progress', '', $ref_id)
145  && in_array($usr_id, ilObjOrgUnitTree::_getInstance()->getEmployees($ref_id, false))
146  ) {
147  return true;
148  }
149  //Permission to view the Learning Progress of an OrgUnit: Superiors
150  if ($DIC->access()->checkAccess('view_learning_progress', '', $ref_id)
151  && in_array($usr_id, ilObjOrgUnitTree::_getInstance()->getSuperiors($ref_id, false))
152  ) {
153  return true;
154  }
155 
156  //Permission to view the Learning Progress of an OrgUnit or SubOrgUnit!: Employees
157  if ($DIC->access()->checkAccess('view_learning_progress_rec', '', $ref_id)
158  && in_array($usr_id, ilObjOrgUnitTree::_getInstance()->getEmployees($ref_id, true))
159  ) {
160  return true;
161  }
162 
163  //Permission to view the Learning Progress of an OrgUnit or SubOrgUnit!: Superiors
164  if ($DIC->access()->checkAccess('view_learning_progress_rec', '', $ref_id)
165  && in_array($usr_id, ilObjOrgUnitTree::_getInstance()->getSuperiors($ref_id, true))
166  ) {
167  return true;
168  }
169 
170  return false;
171  }
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _checkAccessTypes()

static ilObjOrgUnitAccess::_checkAccessTypes ( int  $ref_id)
static
Parameters
int$ref_id
Returns
bool

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

References $DIC.

84  : bool
85  {
86  global $DIC;
87 
88  return $DIC->access()->checkAccess('write', '', $ref_id);
89  }
global $DIC
Definition: goto.php:24

◆ _checkGoto()

static ilObjOrgUnitAccess::_checkGoto (   $a_target)
static
Parameters
string$a_targetcheck whether goto script will succeed
Returns
bool

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

References $DIC.

179  : bool
180  {
181  global $DIC;
182 
183  $t_arr = explode('_', $a_target);
184  if ($t_arr[0] !== 'orgu' || ((int) $t_arr[1]) <= 0) {
185  return false;
186  }
187  if ($DIC->access()->checkAccess('read', '', $t_arr[1])) {
188  return true;
189  }
190 
191  return false;
192  }
global $DIC
Definition: goto.php:24

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

Referenced by ilObjOrgUnitListGUI\init().

26  : array
27  {
28  $commands = [
29  [
30  'permission' => 'read',
31  'cmd' => 'view',
32  'lang_var' => 'show',
33  'default' => true,
34  ],
35  ];
36 
37  return $commands;
38  }
+ Here is the caller graph for this function:

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