ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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)
 check whether goto script will succeed More...
 
- 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)
 
 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.

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:66
global $DIC
Definition: shib_login.php:26

References $DIC, $ref_id, and ilUserAccountSettings\getInstance().

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

+ 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.

66 : bool
67 {
68 global $DIC;
69
70 return $DIC->access()->checkAccess('write', '', $ref_id);
71 }

References $DIC, and $ref_id.

Referenced by ilObjOrgUnitGUI\executeCommand().

+ 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.

80 : bool
81 {
82 global $DIC;
83
84 return $DIC->access()->checkAccess('write', '', $ref_id);
85 }

References $DIC, and $ref_id.

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

+ 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.

59 : bool
60 {
61 global $DIC;
62
63 return $DIC->access()->checkAccess('write', '', $ref_id);
64 }

References $DIC, and $ref_id.

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

+ 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.

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 }

References $DIC, and $ref_id.

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

+ 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.

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 }

References $DIC, and $ref_id.

Referenced by ilOrgUnitUserAssignmentGUI\assignmentsRecursive().

+ 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.

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 }

References $DIC, $ref_id, and ilObjOrgUnitTree\_getInstance().

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

+ 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.

73 : bool
74 {
75 global $DIC;
76
77 return $DIC->access()->checkAccess('write', '', $ref_id);
78 }

References $DIC, and $ref_id.

◆ _checkGoto()

static ilObjOrgUnitAccess::_checkGoto ( string  $target)
static

check whether goto script will succeed

Reimplemented from ilObjectAccess.

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

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 }

References $DIC.

◆ _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'), );

Reimplemented from ilObjectAccess.

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

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 }

Referenced by ilObjOrgUnitListGUI\init().

+ Here is the caller graph for this function:

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