3 require_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"));
179 include_once(
"./Services/AccessControl/classes/class.ilAvailableRolesStatusTableGUI.php");
184 $table->setTitle($this->lng->txt(
"info_available_roles"));
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)) {
200 if ($role[
"obj_id"] == SYSTEM_ROLE_ID) {
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);
237 $full_class =
"ilObj" . $class .
"Access";
238 include_once(
$location .
"/class." . $full_class .
".php");
240 $cmds = call_user_func(array($full_class,
"_getCommands"));
242 array_push($cmds, array(
'permission' =>
'visible',
'cmd' =>
'info'));
257 if (!isset(
$_POST[
'user_login'])) {
260 include_once(
'Services/User/classes/class.ilObjUser.php');
286 $ilAccess = $DIC[
'ilAccess'];
289 $result_set[0][] = $this->lng->txt(
"info_view_of_user");
290 $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) {
321 $ilAccess->doStatusCheck($cmd[
'permission'], $cmd[
'cmd'], $this->object->getRefId(), $this->
user->getId(), $this->
object->getId(), $this->
object->getType());
322 $infos = array_merge($infos, $ilAccess->getInfo());
325 $alert =
"il_ItemAlertProperty";
326 $okay =
"il_ItemOkayProperty";
330 $text =
"<span class=\"" . $okay .
"\">" . $this->lng->txt(
"access") .
"</span><br/> ";
332 foreach ($infos as
$info) {
333 switch ($info[
'type']) {
335 $text .=
"<span class=\"" . $okay .
"\">" . $info[
'text'] .
"</span><br/> ";
340 $obj =
$factory->getInstanceByRefId($info[
'data']);
341 $text .=
"<span class=\"" . $alert .
"\">" . $info[
'text'] .
" (" . $this->lng->txt(
"obj_" . $obj->getType()) .
" #" . $obj->getId() .
": " . $obj->getTitle() .
")</span><br/> ";
345 $text .=
"<span class=\"" . $alert .
"\">" . $info[
'text'] .
"</span><br/> ";
352 $result_set[2][] =
$text;
365 $ilAccess = $DIC[
'ilAccess'];
366 $ilObjDataCache = $DIC[
'ilObjDataCache'];
367 $objDefinition = $DIC[
'objDefinition'];
373 $result_set = array();
376 foreach ($ops_list as $ops) {
377 $access = $ilAccess->doRBACCheck($ops[
'operation'],
"info", $this->object->getRefId(), $this->
user->getId(), $this->
object->getType());
379 $result_set[$counter][
"img"] = $access ? self::IMG_OK : self::IMG_NOT_OK;
381 if (substr($ops[
'operation'], 0, 7) ==
"create_" &&
382 $objDefinition->isPlugin(substr($ops[
'operation'], 7))) {
384 substr($ops[
'operation'], 7),
385 'rbac_' . $ops[
'operation']
387 } elseif ($objDefinition->isPlugin($this->object->getType())) {
389 $this->object->getType(),
390 $this->
object->getType() .
"_" . $ops[
'operation']
392 } elseif (substr($ops[
'operation'], 0, 7) ==
'create_') {
393 $result_set[$counter][
"operation"] = $this->lng->txt(
'rbac_' . $ops[
'operation']);
395 $result_set[$counter][
"operation"] = $this->lng->txt($this->object->getType() .
"_" . $ops[
'operation']);
401 if ($this->
user->getId() == $ilObjDataCache->lookupOwner($this->object->getId())) {
403 (substr($ops[
'operation'], 0, 7) !=
'create_')
and 404 ($ops[
'operation'] !=
'edit_permission')
and 405 ($ops[
'operation'] !=
'edit_leanring_progress')
407 $list_role[] = $this->lng->txt(
'info_owner_of_object');
412 if (in_array($ops[
'ops_id'], $role[
'ops'])) {
413 $list_role[] = $role[
'translation'];
417 if (empty($list_role)) {
418 $list_role[] = $this->lng->txt(
'none');
422 $result_set[$counter][
"role_ownership"] = $list_role;
438 $tree = $DIC[
'tree'];
440 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
442 $path = array_reverse(
$tree->getPathId($this->object->getRefId()));
444 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
447 foreach ($this->valid_roles as $role) {
448 $result_set[$counter][
"img"] = in_array($role[
'obj_id'], $this->user_roles) ? self::IMG_OK : self::IMG_NOT_OK;
450 if (is_subclass_of($this->
object, ilObjectPlugin::class) && $role[
"parent"] == $this->object->getRefId()) {
458 if ($role[
'role_type'] !=
"linked") {
459 $result_set[$counter][
"effective_from"] =
"";
461 $rolfs = $this->rbacreview->getFoldersAssignedToRole($role[
"obj_id"]);
464 foreach (
$path as $node) {
470 if (in_array($node, $rolfs)) {
471 $nodedata =
$tree->getNodeData($node);
472 $result_set[$counter][
"effective_from"] = $nodedata[
"title"];
473 $result_set[$counter][
"effective_from_ref_id"] = $node;
479 if (in_array($role[
'obj_id'], $this->global_roles)) {
480 $result_set[$counter][
"original_position"] = $this->lng->txt(
"global");
481 $result_set[$counter][
"original_position_ref_id"] =
false;
483 $rolf = $this->rbacreview->getFoldersAssignedToRole($role[
"obj_id"],
true);
484 $parent_node =
$tree->getNodeData($rolf[0]);
485 $result_set[$counter][
"original_position"] = $parent_node[
"title"];
486 $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.
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.
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.
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)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
getLinkTargetByClass( $a_class, $a_cmd="", $a_anchor="", $a_asynch=false, $xml_style=true)
Get link target for command using gui class name.
static _removeObjectId($a_role_title)
executeCommand()
execute command
if(empty($password)) $table
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
getFormAction( $a_gui_obj, $a_fallback_cmd="", $a_anchor="", $a_asynch=false, $xml_style=true)
Get form action url for gui class object.