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"));
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)
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"];
const IL_NO_PARENT_ACCESS
Table for Acces Permissons in Permission > Permission of User.
Table for Available Roles in Permission > Permission of User.
This class provides processing control methods.
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.
getLinkTargetByClass($a_class, $a_cmd="", $a_anchor="", $a_asynch=false, $xml_style=true)
Get link target for command using gui class name.
getNextClass($a_gui_class=null)
Get next class in the control path from the current class to the target command class.
& forwardCommand(&$a_gui_object)
Forward flow of control to next gui class this invokes the executeCommand() method of the gui object ...
setReturn(&$a_gui_obj, $a_cmd)
Set return command.
_getTranslation($a_role_title)
static _lookupId($a_user_str)
Lookup id by login.
This class displays the permission status of a user concerning a specific object.
__construct(&$a_obj)
Constructor @access public.
& executeCommand()
execute command
getAccessStatusInfoData()
Access Status Info Data.
accessStatusInfo()
Access- and Statusinformation Info.
getAssignedValidRoles()
get Assigned Valid Roles
addToolbar()
Creates Toolbar entries.
accessPermissionsTable()
Access Permissions Table.
getAccessPermissionTableData()
Access Permissions Table Data.
availableRolesTable()
Available Roles Table.
getAvailableRolesTableData()
Available Roles Table Data.
getCommands($a_type)
get Commands
static lookupTxt($a_mod_prefix, $a_pl_id, $a_lang_var)
Lookup language text.
static _getOperationList($a_type=null)
get operation list by object type @access public @access static
special template class to simplify handling of ITX/PEAR
This class represents a text property in a property form.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.