ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 _checkAccessStaffRec ($ref_id)
 
static _checkAccessAdministrateUsers ($ref_id)
 
static _checkAccessToUserLearningProgress ($ref_id, $usr_id)
 
static _checkGoto ($a_target)
 check whether goto script will succeed More...
 
- 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. 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...
 

Detailed Description

Member Function Documentation

◆ _checkAccessAdministrateUsers()

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

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

81 {
82 global $DIC;
83 $ilAccess = $DIC['ilAccess'];
84
85 if (ilUserAccountSettings::getInstance()->isLocalUserAdministrationEnabled() and
86 $ilAccess->checkAccess('cat_administrate_users', "", $ref_id)) {
87 return true;
88 }
89
90 return false;
91 }
static getInstance()
Singelton get instance.
global $DIC
Definition: saml.php:7

References $DIC, and ilUserAccountSettings\getInstance().

Referenced by ilObjOrgUnitGUI\executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _checkAccessStaff()

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

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

43 {
44 global $DIC;
45 $ilAccess = $DIC['ilAccess'];
46
47 if (($ilAccess->checkAccess("write", "", $ref_id)
48 or $ilAccess->checkAccess("view_learning_progress", "", $ref_id))
49 and $ilAccess->checkAccess("read", "", $ref_id)) {
50 return true;
51 }
52
53 return false;
54 }

References $DIC.

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

+ Here is the caller graph for this function:

◆ _checkAccessStaffRec()

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

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

62 {
63 global $DIC;
64 $ilAccess = $DIC['ilAccess'];
65
66 if (($ilAccess->checkAccess("write", "", $ref_id)
67 or $ilAccess->checkAccess("view_learning_progress_rec", "", $ref_id))
68 and $ilAccess->checkAccess("read", "", $ref_id)) {
69 return true;
70 }
71
72 return false;
73 }

References $DIC.

Referenced by ilOrgUnitStaffGUI\showStaffRec().

+ 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 99 of file class.ilObjOrgUnitAccess.php.

100 {
101 global $DIC;
102 $ilAccess = $DIC['ilAccess'];
103
104 //Permission to view the Learning Progress of an OrgUnit: Employees
105 if ($ilAccess->checkAccess("view_learning_progress", "", $ref_id)
106 and in_array($usr_id, ilObjOrgUnitTree::_getInstance()->getEmployees($ref_id, false))) {
107 return true;
108 }
109 //Permission to view the Learning Progress of an OrgUnit: Superiors
110 if ($ilAccess->checkAccess("view_learning_progress", "", $ref_id)
111 and in_array($usr_id, ilObjOrgUnitTree::_getInstance()->getSuperiors($ref_id, false))) {
112 return true;
113 }
114
115 //Permission to view the Learning Progress of an OrgUnit or SubOrgUnit!: Employees
116 if ($ilAccess->checkAccess("view_learning_progress_rec", "", $ref_id)
117 and in_array($usr_id, ilObjOrgUnitTree::_getInstance()->getEmployees($ref_id, true))) {
118 return true;
119 }
120
121 //Permission to view the Learning Progress of an OrgUnit or SubOrgUnit!: Superiors
122 if ($ilAccess->checkAccess("view_learning_progress_rec", "", $ref_id)
123 and in_array($usr_id, ilObjOrgUnitTree::_getInstance()->getSuperiors($ref_id, true))) {
124 return true;
125 }
126
127 return false;
128 }

References $DIC, 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:

◆ _checkGoto()

static ilObjOrgUnitAccess::_checkGoto (   $a_target)
static

check whether goto script will succeed

Reimplemented from ilObjectAccess.

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

135 {
136 global $DIC;
137 $ilAccess = $DIC['ilAccess'];
138 $t_arr = explode('_', $a_target);
139 if ($t_arr[0] != 'orgu' || ((int) $t_arr[1]) <= 0) {
140 return false;
141 }
142 if ($ilAccess->checkAccess('read', '', $t_arr[1])) {
143 return true;
144 }
145
146 return false;
147 }

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 25 of file class.ilObjOrgUnitAccess.php.

26 {
27 $commands = array();
28 $commands[] = array( 'permission' => 'read', 'cmd' => 'view', 'lang_var' => 'show', 'default' => true );
29 // $commands[] = array('permission' => 'read', 'cmd' => 'render', 'lang_var' => 'show', 'default' => true);
30 // $commands[] = array('permission' => 'write', 'cmd' => 'enableAdministrationPanel', 'lang_var' => 'edit_content');
31 // $commands[] = array( 'permission' => 'write', 'cmd' => 'edit', 'lang_var' => 'settings' );
32
33 return $commands;
34 }

Referenced by ilObjOrgUnitListGUI\init().

+ Here is the caller graph for this function:

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