3require_once(
'./Services/Repository/classes/class.ilObjectPlugin.php');
55 $this->
object = $a_obj;
60 $this->global_roles =
$rbacreview->getGlobalRoles();
61 $this->valid_roles =
$rbacreview->getParentRoleIds($this->object->getRefId());
77 switch ($next_class) {
78 case 'ilrepositorysearchgui':
79 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
97 $tpl =
new ilTemplate(
"tpl.info_layout.html",
false,
false,
"Services/AccessControl");
102 $tpl->setVariable(
"INFO_REMARK_INTERRUPTED", $this->lng->txt(
'info_remark_interrupted'));
104 $this->tpl->setVariable(
"ADM_CONTENT",
$tpl->get());
116 $ilToolbar =
$DIC[
'ilToolbar'];
120 $ilToolbar->addText($this->lng->txt(
'user'));
122 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
126 'ilRepositorySearchGUI'),
'doUserAutoComplete',
'',
true));
130 $ilToolbar->addInputItem(
$login);
132 $ilToolbar->addFormButton($this->lng->txt(
"info_change_user_view"),
"perminfo");
143 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
148 $info->addSection($this->lng->txt(
"info_access_and_status_info"));
154 return $info->getHTML();
163 include_once(
"./Services/AccessControl/classes/class.ilAccessPermissionsStatusTableGUI.php");
168 $table->setTitle($this->lng->txt(
"info_access_permissions"));
170 return $table->getHTML();
179 include_once(
"./Services/AccessControl/classes/class.ilAvailableRolesStatusTableGUI.php");
184 $table->setTitle($this->lng->txt(
"info_available_roles"));
186 return $table->getHTML();
195 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
198 foreach ($this->valid_roles as $role) {
199 if (in_array($role[
'obj_id'], $this->user_roles)) {
204 foreach ($ops_list as $ops_data) {
205 $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');
233 $objDefinition =
$DIC[
'objDefinition'];
235 $class = $objDefinition->getClassName($a_type);
236 $location = $objDefinition->getLocation($a_type);
237 $full_class =
"ilObj" . $class .
"Access";
239 $cmds = call_user_func(array($full_class,
"_getCommands"));
241 array_push($cmds, array(
'permission' =>
'visible',
'cmd' =>
'info'));
256 if (!isset(
$_POST[
'user_login'])) {
259 include_once(
'Services/User/classes/class.ilObjUser.php');
266 if (
$user ===
false or
$user->getType() !=
'usr') {
285 $ilAccess =
$DIC[
'ilAccess'];
288 $result_set[0][] = $this->lng->txt(
"info_view_of_user");
289 $result_set[0][] = $this->
user->getFullname() .
" (#" . $this->
user->getId() .
")";
299 $result_set[1][] = $this->lng->txt(
"roles");
300 $result_set[1][] = $roles_str;
302 $result_set[2][] = $this->lng->txt(
"status");
305 $ilAccess->checkAccessOfUser(
306 $this->
user->getId(),
309 $this->object->getRefId(),
310 $this->object->getType(),
311 $this->object->getId()
314 $infos = array_merge($infos, $ilAccess->getInfo());
316 $cmds = $this->
getCommands($this->object->getType());
318 foreach ($cmds as $cmd) {
320 $ilAccess->doStatusCheck($cmd[
'permission'], $cmd[
'cmd'], $this->object->getRefId(), $this->user->getId(), $this->object->getId(), $this->object->getType());
321 $infos = array_merge($infos, $ilAccess->getInfo());
324 $alert =
"il_ItemAlertProperty";
325 $okay =
"il_ItemOkayProperty";
329 $text =
"<span class=\"" . $okay .
"\">" . $this->lng->txt(
"access") .
"</span><br/> ";
331 foreach ($infos as $info) {
332 switch ($info[
'type']) {
334 $text .=
"<span class=\"" . $okay .
"\">" . $info[
'text'] .
"</span><br/> ";
339 $obj =
$factory->getInstanceByRefId($info[
'data']);
340 $text .=
"<span class=\"" . $alert .
"\">" . $info[
'text'] .
" (" . $this->lng->txt(
"obj_" . $obj->getType()) .
" #" . $obj->getId() .
": " . $obj->getTitle() .
")</span><br/> ";
344 $text .=
"<span class=\"" . $alert .
"\">" . $info[
'text'] .
"</span><br/> ";
351 $result_set[2][] = $text;
364 $ilAccess =
$DIC[
'ilAccess'];
365 $ilObjDataCache =
$DIC[
'ilObjDataCache'];
366 $objDefinition =
$DIC[
'objDefinition'];
372 $result_set = array();
375 foreach ($ops_list as $ops) {
376 $access = $ilAccess->doRBACCheck($ops[
'operation'],
"info", $this->object->getRefId(), $this->user->getId(), $this->object->getType());
380 if (substr($ops[
'operation'], 0, 7) ==
"create_" &&
381 $objDefinition->isPlugin(substr($ops[
'operation'], 7))) {
383 substr($ops[
'operation'], 7),
384 'obj_' . substr($ops[
'operation'], 7)
386 } elseif ($objDefinition->isPlugin($this->object->getType())) {
388 $this->object->getType(),
389 $this->object->getType() .
"_" . $ops[
'operation']
391 } elseif (substr($ops[
'operation'], 0, 7) ==
'create_') {
392 $result_set[$counter][
"operation"] = $this->lng->txt(
'rbac_' . $ops[
'operation']);
394 $result_set[$counter][
"operation"] = $this->lng->txt($this->object->getType() .
"_" . $ops[
'operation']);
400 if ($this->
user->getId() == $ilObjDataCache->lookupOwner($this->object->getId())) {
402 (substr($ops[
'operation'], 0, 7) !=
'create_') and
403 ($ops[
'operation'] !=
'edit_permission') and
404 ($ops[
'operation'] !=
'edit_leanring_progress')
406 $list_role[] = $this->lng->txt(
'info_owner_of_object');
411 if (in_array($ops[
'ops_id'], $role[
'ops'])) {
412 $list_role[] = $role[
'translation'];
416 if (empty($list_role)) {
417 $list_role[] = $this->lng->txt(
'none');
421 $result_set[$counter][
"role_ownership"] = $list_role;
437 $tree =
$DIC[
'tree'];
439 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
441 $path = array_reverse($tree->getPathId($this->object->getRefId()));
443 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
446 foreach ($this->valid_roles as $role) {
449 if (is_subclass_of($this->
object, ilObjectPlugin::class) && $role[
"parent"] == $this->object->getRefId()) {
457 if ($role[
'role_type'] !=
"linked") {
458 $result_set[$counter][
"effective_from"] =
"";
460 $rolfs = $this->rbacreview->getFoldersAssignedToRole($role[
"obj_id"]);
463 foreach ($path as $node) {
469 if (in_array($node, $rolfs)) {
470 $nodedata = $tree->getNodeData($node);
471 $result_set[$counter][
"effective_from"] = $nodedata[
"title"];
472 $result_set[$counter][
"effective_from_ref_id"] = $node;
478 if (in_array($role[
'obj_id'], $this->global_roles)) {
479 $result_set[$counter][
"original_position"] = $this->lng->txt(
"global");
480 $result_set[$counter][
"original_position_ref_id"] =
false;
482 $rolf = $this->rbacreview->getFoldersAssignedToRole($role[
"obj_id"],
true);
483 $parent_node = $tree->getNodeData($rolf[0]);
484 $result_set[$counter][
"original_position"] = $parent_node[
"title"];
485 $result_set[$counter][
"original_position_ref_id"] = $parent_node[
"ref_id"];
An exception for terminatinating execution or to throw for unit testing.
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.
getFormAction( $a_gui_obj, $a_fallback_cmd="", $a_anchor="", $a_asynch=false, $xml_style=false)
Get form action url for gui class object.
getCmd($a_default_cmd="", $a_safe_commands="")
Determines current get/post command.
setReturn($a_gui_obj, $a_cmd)
Set return command.
getNextClass($a_gui_class=null)
Get next class in the control path from the current class to the target command class.
getLinkTargetByClass( $a_class, $a_cmd="", $a_anchor="", $a_asynch=false, $xml_style=false)
Get link target for command using gui class name.
forwardCommand($a_gui_object)
Forward flow of control to next gui class this invokes the executeCommand() method of the gui object ...
static _getTranslation($a_role_title)
static _removeObjectId($a_role_title)
static _lookupId($a_user_str)
Lookup id by login.
Class ilObjectFactory This class offers methods to get instances of the type-specific object classes ...
This class displays the permission status of a user concerning a specific object.
__construct(&$a_obj)
Constructor @access public.
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.
executeCommand()
execute command
getAvailableRolesTableData()
Available Roles Table Data.
getCommands($a_type)
get Commands
static lookupTxtById($plugin_id, $lang_var)
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.