3 require_once(
'./Services/Repository/classes/class.ilObjectPlugin.php');
50 $this->
object = $a_obj;
54 $this->user_roles = $rbacreview->assignedRoles($this->
user->getId());
55 $this->global_roles = $rbacreview->getGlobalRoles();
56 $this->valid_roles = $rbacreview->getParentRoleIds($this->
object->getRefId());
73 case 'ilrepositorysearchgui':
74 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
92 $tpl =
new ilTemplate(
"tpl.info_layout.html",
false,
false,
"Services/AccessControl");
97 $tpl->setVariable(
"INFO_REMARK_INTERRUPTED",$this->lng->txt(
'info_remark_interrupted'));
99 $this->tpl->setVariable(
"ADM_CONTENT", $tpl->get());
113 $ilToolbar->addText($this->lng->txt(
'user'));
115 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
117 $login =
new ilTextInputGUI($this->lng->txt(
"username"),
"user_login");
119 'ilRepositorySearchGUI'),
'doUserAutoComplete',
'',
true));
121 $login->setValue($this->
user->getLogin());
123 $ilToolbar->addInputItem($login);
125 $ilToolbar->addFormButton($this->lng->txt(
"info_change_user_view"),
"perminfo");
136 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
141 $info->addSection($this->lng->txt(
"info_access_and_status_info"));
148 return $info->getHTML();
157 include_once(
"./Services/AccessControl/classes/class.ilAccessPermissionsStatusTableGUI.php");
162 $table->setTitle($this->lng->txt(
"info_access_permissions"));
164 return $table->getHTML();
173 include_once(
"./Services/AccessControl/classes/class.ilAvailableRolesStatusTableGUI.php");
178 $table->setTitle($this->lng->txt(
"info_available_roles"));
180 return $table->getHTML();
189 include_once (
'./Services/AccessControl/classes/class.ilObjRole.php');
190 $assigned_valid_roles =
array();
192 foreach ($this->valid_roles as $role)
194 if (in_array($role[
'obj_id'],$this->user_roles))
196 if ($role[
"obj_id"] == SYSTEM_ROLE_ID)
201 foreach ($ops_list as $ops_data)
203 $ops[] = (int) $ops_data[
'ops_id'];
210 $role[
'ops'] = $this->rbacreview->getRoleOperationsOnObject($role[
"obj_id"],$this->
object->getRefId());
213 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
215 $assigned_valid_roles[] = $role;
231 global $objDefinition;
233 $class = $objDefinition->getClassName(
$a_type);
235 $full_class =
"ilObj".$class.
"Access";
236 include_once(
$location.
"/class.".$full_class.
".php");
238 $cmds = call_user_func(
array($full_class,
"_getCommands"));
240 array_push($cmds,
array(
'permission' =>
'visible',
'cmd' =>
'info'));
253 if (!isset(
$_POST[
'user_login']))
259 include_once(
'Services/User/classes/class.ilObjUser.php');
263 $user = $factory->getInstanceByObjId($user_id,
false);
266 if ($user ===
false or $user->getType() !=
'usr')
289 $result_set[0][] = $this->lng->txt(
"info_view_of_user");
290 $result_set[0][] = $this->
user->getFullname().
" (#".$this->
user->getId().
")";
292 $assigned_valid_roles =
array();
296 $assigned_valid_roles[] = $role[
"translation"];
299 $roles_str = implode(
", ",$assigned_valid_roles);
301 $result_set[1][] = $this->lng->txt(
"roles");
302 $result_set[1][] = $roles_str;
304 $result_set[2][] = $this->lng->txt(
"status");
307 $ilAccess->checkAccessOfUser(
308 $this->
user->getId(),
311 $this->
object->getRefId(),
312 $this->
object->getType(),
313 $this->
object->getId()
316 $infos = array_merge($infos,$ilAccess->getInfo());
320 foreach ($cmds as
$cmd)
323 $ilAccess->doStatusCheck($cmd[
'permission'],$cmd[
'cmd'],$this->
object->getRefId(),$this->
user->getId(),$this->
object->getId(),$this->
object->getType());
324 $infos = array_merge($infos,$ilAccess->getInfo());
327 $alert =
"il_ItemAlertProperty";
328 $okay =
"il_ItemOkayProperty";
333 $text =
"<span class=\"".$okay.
"\">".$this->lng->txt(
"access").
"</span><br/> ";
337 foreach ($infos as
$info)
339 switch ($info[
'type'])
341 case IL_STATUS_MESSAGE:
342 $text .=
"<span class=\"".$okay.
"\">".$info[
'text'].
"</span><br/> ";
347 $obj = $factory->getInstanceByRefId($info[
'data']);
348 $text .=
"<span class=\"".$alert.
"\">".$info[
'text'].
" (".$this->lng->txt(
"obj_".$obj->getType()).
" #".$obj->getId().
": ".$obj->getTitle().
")</span><br/> ";
352 $text .=
"<span class=\"".$alert.
"\">".$info[
'text'].
"</span><br/> ";
359 $result_set[2][] =
$text;
370 global $ilAccess,$ilObjDataCache,$objDefinition;
376 $result_set =
array();
379 foreach ($ops_list as $ops)
381 $access = $ilAccess->doRBACCheck($ops[
'operation'],
"info",$this->
object->getRefId(),$this->
user->getId(),$this->
object->getType());
383 $result_set[
$counter][
"img"] = $access ? self::IMG_OK : self::IMG_NOT_OK;
385 if (substr($ops[
'operation'], 0, 7) ==
"create_" &&
386 $objDefinition->isPlugin(substr($ops[
'operation'], 7)))
389 'rbac_'.$ops[
'operation']);
391 else if ($objDefinition->isPlugin($this->object->getType()))
394 $this->
object->getType().
"_".$ops[
'operation']);
396 elseif(substr($ops[
'operation'],0,7) ==
'create_')
398 $result_set[
$counter][
"operation"] = $this->lng->txt(
'rbac_'.$ops[
'operation']);
402 $result_set[
$counter][
"operation"] = $this->lng->txt($this->
object->getType().
"_".$ops[
'operation']);
408 if($this->
user->getId() == $ilObjDataCache->lookupOwner($this->
object->getId()))
411 (substr($ops[
'operation'],0,7) !=
'create_')
and 412 ($ops[
'operation'] !=
'edit_permission')
and 413 ($ops[
'operation'] !=
'edit_leanring_progress')
416 $list_role[] = $this->lng->txt(
'info_owner_of_object');
422 if (in_array($ops[
'ops_id'],$role[
'ops']))
424 $list_role[] = $role[
'translation'];
428 if (empty($list_role))
430 $list_role[] = $this->lng->txt(
'none');
434 $result_set[
$counter][
"role_ownership"] = $list_role;
450 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
452 $path = array_reverse($tree->getPathId($this->object->getRefId()));
454 include_once (
'./Services/AccessControl/classes/class.ilObjRole.php');
457 foreach ($this->valid_roles as $role)
459 $result_set[
$counter][
"img"] = in_array($role[
'obj_id'],$this->user_roles) ? self::IMG_OK : self::IMG_NOT_OK;
462 if ($role[
'role_type'] !=
"linked")
464 $result_set[
$counter][
"effective_from"] =
"";
468 $rolfs = $this->rbacreview->getFoldersAssignedToRole($role[
"obj_id"]);
471 foreach (
$path as $node)
479 if (in_array($node,$rolfs))
481 $nodedata = $tree->getNodeData($node);
482 $result_set[
$counter][
"effective_from"] = $nodedata[
"title"];
483 $result_set[
$counter][
"effective_from_ref_id"] = $node;
489 if (in_array($role[
'obj_id'],$this->global_roles))
491 $result_set[
$counter][
"original_position"] = $this->lng->txt(
"global");
492 $result_set[
$counter][
"original_position_ref_id"] =
false;
496 $rolf = $this->rbacreview->getFoldersAssignedToRole($role[
"obj_id"],
true);
497 $parent_node = $tree->getNodeData($rolf[0]);
498 $result_set[
$counter][
"original_position"] = $parent_node[
"title"];
499 $result_set[
$counter][
"original_position_ref_id"] = $parent_node[
"ref_id"];
getAvailableRolesTableData()
Available Roles Table Data.
getAccessStatusInfoData()
Access Status Info Data.
This class provides processing control methods.
setDataSource($href, $a_delimiter=null)
set datasource link for js autocomplete
setReturn($a_gui_obj, $a_cmd)
Set return command.
static lookupTxtById($plugin_id, $lang_var)
addToolbar()
Creates Toolbar entries.
__construct(&$a_obj)
Constructor public.
Table for Acces Permissons in Permission > Permission of User.
static _getOperationList($a_type=null)
get operation list by object type public static
availableRolesTable()
Available Roles Table.
getLinkTargetByClass($a_class, $a_cmd="", $a_anchor="", $a_asynch=false, $xml_style=true)
Get link target for command using gui class name.
const IL_NO_PARENT_ACCESS
static _lookupId($a_user_str)
Lookup id by login.
getAccessPermissionTableData()
Access Permissions Table Data.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
getNextClass($a_gui_class=null)
Get next class in the control path from the current class to the target command class.
accessStatusInfo()
Access- and Statusinformation Info.
getCmd($a_default_cmd="", $a_safe_commands="")
Determines current get/post command.
getFormAction($a_gui_obj, $a_fallback_cmd="", $a_anchor="", $a_asynch=false, $xml_style=true)
Get form action url for gui class object.
special template class to simplify handling of ITX/PEAR
This class represents a text property in a property form.
accessPermissionsTable()
Access Permissions Table.
getCommands($a_type)
get Commands
static _getTranslation($a_role_title)
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Create new PHPExcel object
obj_idprivate
executeCommand()
execute command
Table for Available Roles in Permission > Permission of User.
This class displays the permission status of a user concerning a specific object. ...
forwardCommand($a_gui_object)
Forward flow of control to next gui class this invokes the executeCommand() method of the gui object ...
getAssignedValidRoles()
get Assigned Valid Roles