49 $this->
object = $a_obj;
53 $this->user_roles = $rbacreview->assignedRoles($this->user->getId());
54 $this->global_roles = $rbacreview->getGlobalRoles();
55 $this->valid_roles = $rbacreview->getParentRoleIds($this->object->getRefId());
72 case 'ilrepositorysearchgui':
73 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
91 $tpl =
new ilTemplate(
"tpl.info_layout.html",
false,
false,
"Services/AccessControl");
96 $tpl->setVariable(
"INFO_REMARK_INTERRUPTED",$this->lng->txt(
'info_remark_interrupted'));
98 $this->tpl->setVariable(
"ADM_CONTENT",
$tpl->get());
112 $ilToolbar->addText($this->lng->txt(
'user'));
114 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
116 $login =
new ilTextInputGUI($this->lng->txt(
"username"),
"user_login");
118 'ilRepositorySearchGUI'),
'doUserAutoComplete',
'',
true));
120 $login->setValue($this->user->getLogin());
122 $ilToolbar->addInputItem($login);
124 $ilToolbar->addFormButton($this->lng->txt(
"info_change_user_view"),
"perminfo");
135 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
140 $info->addSection($this->lng->txt(
"info_access_and_status_info"));
144 $info->addProperty($data[0], $data[1]);
147 return $info->getHTML();
156 include_once(
"./Services/AccessControl/classes/class.ilAccessPermissionsStatusTableGUI.php");
161 $table->setTitle($this->lng->txt(
"info_access_permissions"));
163 return $table->getHTML();
172 include_once(
"./Services/AccessControl/classes/class.ilAvailableRolesStatusTableGUI.php");
177 $table->setTitle($this->lng->txt(
"info_available_roles"));
179 return $table->getHTML();
188 include_once (
'./Services/AccessControl/classes/class.ilObjRole.php');
191 foreach ($this->valid_roles as $role)
193 if (in_array($role[
'obj_id'],$this->user_roles))
195 if ($role[
"obj_id"] == SYSTEM_ROLE_ID)
200 foreach ($ops_list as $ops_data)
202 $ops[] = (int) $ops_data[
'ops_id'];
209 $role[
'ops'] = $this->rbacreview->getRoleOperationsOnObject($role[
"obj_id"],$this->object->getRefId());
212 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
230 global $objDefinition;
232 $class = $objDefinition->getClassName($a_type);
233 $location = $objDefinition->getLocation($a_type);
234 $full_class =
"ilObj".$class.
"Access";
235 include_once(
$location.
"/class.".$full_class.
".php");
237 $cmds = call_user_func(array($full_class,
"_getCommands"));
239 array_push($cmds,array(
'permission' =>
'visible',
'cmd' =>
'info'));
252 if (!isset(
$_POST[
'user_login']))
258 include_once(
'Services/User/classes/class.ilObjUser.php');
262 $user = $factory->getInstanceByObjId($user_id,
false);
265 if (
$user ===
false or
$user->getType() !=
'usr')
288 $result_set[0][] = $this->lng->txt(
"info_view_of_user");
289 $result_set[0][] = $this->user->getFullname().
" (#".$this->user->getId().
")";
300 $result_set[1][] = $this->lng->txt(
"roles");
301 $result_set[1][] = $roles_str;
303 $result_set[2][] = $this->lng->txt(
"status");
306 $ilAccess->checkAccessOfUser(
307 $this->user->getId(),
310 $this->
object->getRefId(),
311 $this->
object->getType(),
312 $this->
object->getId()
315 $infos = array_merge($infos,$ilAccess->getInfo());
317 $cmds = $this->
getCommands($this->object->getType());
319 foreach ($cmds as
$cmd)
322 $ilAccess->doStatusCheck($cmd[
'permission'],$cmd[
'cmd'],$this->object->getRefId(),$this->user->getId(),$this->
object->getId(),$this->
object->getType());
323 $infos = array_merge($infos,$ilAccess->getInfo());
326 $alert =
"il_ItemAlertProperty";
327 $okay =
"il_ItemOkayProperty";
332 $text =
"<span class=\"".$okay.
"\">".$this->lng->txt(
"access").
"</span><br/> ";
336 foreach ($infos as $info)
338 switch ($info[
'type'])
340 case IL_STATUS_MESSAGE:
341 $text .=
"<span class=\"".$okay.
"\">".$info[
'text'].
"</span><br/> ";
346 $obj = $factory->getInstanceByRefId($info[
'data']);
347 $text .=
"<span class=\"".$alert.
"\">".$info[
'text'].
" (".$this->lng->txt(
"obj_".$obj->getType()).
" #".$obj->getId().
": ".$obj->getTitle().
")</span><br/> ";
351 $text .=
"<span class=\"".$alert.
"\">".$info[
'text'].
"</span><br/> ";
358 $result_set[2][] = $text;
369 global $ilAccess,$ilObjDataCache,$objDefinition;
375 $result_set = array();
378 foreach ($ops_list as $ops)
380 $access = $ilAccess->doRBACCheck($ops[
'operation'],
"info",$this->object->getRefId(),$this->user->getId(),$this->
object->getType());
384 if (substr($ops[
'operation'], 0, 7) ==
"create_" &&
385 $objDefinition->isPlugin(substr($ops[
'operation'], 7)))
387 $result_set[$counter][
"operation"] =
ilPlugin::lookupTxt(
"rep_robj", substr($ops[
'operation'],7),
388 #$this->object->getType().
"_".$ops[
'operation']);
389 'rbac_'.$ops[
'operation']);
391 else if ($objDefinition->isPlugin($this->object->getType()))
393 $result_set[$counter][
"operation"] =
ilPlugin::lookupTxt(
"rep_robj", $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"];