38 $this->objDefinition =& $objDefinition;
41 $this->lng->loadLanguageModule(
"rbac");
45 $this->gui_obj = $a_gui_obj;
47 $this->roles = array();
58 global $rbacsystem,
$ilErr;
61 if (!$rbacsystem->checkAccess(
"edit_permission",$this->gui_obj->object->getRefId()))
63 $ilErr->raiseError($this->lng->txt(
"permission_denied"),$ilErr->MESSAGE);
66 $next_class = $this->ctrl->getNextClass($this);
71 include_once(
"Services/AccessControl/classes/class.ilObjRoleGUI.php");
73 $this->gui_obj->setBackTarget($this->lng->txt(
"perm_settings"),$this->ctrl->getLinkTarget($this,
"perm"));
74 $ret = $this->ctrl->forwardCommand($this->gui_obj);
78 $cmd = $this->ctrl->getCmd();
93 global $rbacsystem, $rbacreview,$tree,$ilToolbar;
95 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.edit_permissions.html",
"Services/AccessControl");
98 $object_types_exclude = array(
"adm",
"root",
"objf",
"taxf");
101 $subobjects = $this->objDefinition->getSubObjects($this->gui_obj->object->getType());
102 if (isset($subobjects[
"rolf"]) && !in_array($this->gui_obj->object->getType(),$object_types_exclude) && $this->gui_obj->object->getRefId() != ROLE_FOLDER_ID)
105 $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
106 $ilToolbar->addButton($this->lng->txt(
'rbac_add_new_local_role'),$this->ctrl->getLinkTarget($this,
'displayAddRoleForm'));
116 $this->num_roles = count($this->roles);
119 $this->tpl->setCurrentBlock(
"filter");
120 $this->tpl->setVariable(
"FILTER_TXT_FILTER",$this->lng->txt(
'filter'));
122 $this->tpl->setVariable(
"FILTER_ACTION",$this->ctrl->getFormAction($this).
"&cmd=perm");
123 $this->tpl->setVariable(
"FILTER_NAME",
'view');
124 $this->tpl->setVariable(
"FILTER_VALUE",$this->lng->txt(
'apply_filter'));
125 $this->tpl->parseCurrentBlock();
128 if ($this->num_roles < 1)
134 $this->tpl->addBlockFile(
"PERM_PERMISSIONS",
"permissions",
"tpl.obj_perm_permissions.html");
136 $this->tpl->setVariable(
"TXT_TITLE", $this->lng->txt(
"permission_settings"));
138 $this->tpl->setVariable(
"TXT_TITLE_INFO",
139 sprintf($this->lng->txt(
"permission_settings_info"),
140 $this->gui_obj->object->getTitle()
142 $this->tpl->setVariable(
"COLSPAN", $this->num_roles);
143 $this->tpl->setVariable(
"FORMACTION",
144 $this->ctrl->getLinkTarget($this,
"permSave"));
145 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
148 $global_roles = $rbacreview->getGlobalRoles();
150 foreach ($this->roles as $role)
152 $tmp_role_folder = $rbacreview->getRoleFolderOfObject($this->gui_obj->object->getRefId());
153 $tmp_local_roles = array();
155 if ($tmp_role_folder)
157 $tmp_local_roles = $rbacreview->getRolesOfRoleFolder($tmp_role_folder[
"ref_id"]);
161 if ($role[
'protected'] ==
false and in_array($role[
'obj_id'],$tmp_local_roles))
163 $role_folder_data = $rbacreview->getRoleFolderOfObject(
$_GET[
'ref_id']);
164 $role_folder_id = $role_folder_data[
'ref_id'];
167 $this->tpl->setCurrentBlock(
"rolelink_open");
169 $up_path = defined(
'ILIAS_MODULE') ?
"../" :
"";
170 $this->ctrl->setParameterByClass(
"ilobjrolegui",
"obj_id",
172 $this->ctrl->setParameterByClass(
"ilobjrolegui",
"rolf_ref_id",
174 $this->tpl->setVariable(
"LINK_ROLE_RULESET",
175 $this->ctrl->getLinkTargetByClass(
"ilobjrolegui",
""));
177 $this->tpl->setVariable(
"TXT_ROLE_RULESET",$this->lng->txt(
"edit_perm_ruleset"));
178 $this->tpl->parseCurrentBlock();
180 $this->tpl->touchBlock(
"rolelink_close");
183 $this->tpl->setCurrentBlock(
"role_infos");
186 include_once (
'Services/AccessControl/classes/class.ilObjRole.php');
191 if (in_array($role[
"obj_id"],$global_roles))
193 $this->tpl->setVariable(
"ROLE_CONTEXT_TYPE",
"global");
197 if($rolf = $rbacreview->getFoldersAssignedToRole($role[
"obj_id"],
true))
199 $parent_node = $tree->getParentNodeData($rolf[0]);
202 $this->tpl->setVariable(
"ROLE_CONTEXT_TYPE",$parent_node[
"title"]);
206 $this->tpl->parseCurrentBlock();
208 $this->ctrl->clearParametersByClass(
"ilobjrolegui");
224 $this->tpl->setVariable(
"COLSPAN", $this->num_roles);
234 global $rbacreview, $rbacadmin, $rbacsystem;
238 include_once
"Services/AccessControl/classes/class.ilRbacLog.php";
242 foreach($this->roles as $role_id =>
$data)
244 $rbacadmin->revokePermission($this->gui_obj->object->getRefId(),$role_id);
247 if (is_array(
$_POST[
"perm"]))
249 foreach (
$_POST[
"perm"] as $key => $new_role_perms)
251 $rbacadmin->grantPermission($key,$new_role_perms,$this->gui_obj->object->getRefId());
256 $this->gui_obj->object->update();
266 $rolf_data = $rbacreview->getRoleFolderOfObject($this->gui_obj->object->getRefId());
267 $rolf_id = $rolf_data[
"child"];
269 $stop_inherit_roles =
$_POST[
"stop_inherit"] ?
$_POST[
"stop_inherit"] : array();
271 if ($stop_inherit_roles)
277 $rfoldObj = $this->gui_obj->object->createRoleFolder();
280 $rolf_id = $rfoldObj->getRefId();
283 $roles_of_folder = $rbacreview->getRolesOfRoleFolder($rolf_id);
285 foreach ($stop_inherit_roles as $stop_inherit)
288 if (!in_array($stop_inherit,$roles_of_folder))
290 $parentRoles = $rbacreview->getParentRoleIds($rolf_id);
291 $rbacadmin->copyRoleTemplatePermissions($stop_inherit,$parentRoles[$stop_inherit][
"parent"],
292 $rolf_id,$stop_inherit);
293 $rbacadmin->assignRoleToFolder($stop_inherit,$rolf_id,
'n');
298 if ($rolf_id and $rolf_id != ROLE_FOLDER_ID)
301 $linked_roles = $rbacreview->getLinkedRolesOfRoleFolder($rolf_id);
302 $linked_roles_to_remove = array_diff($linked_roles,$stop_inherit_roles);
305 $linked_roles_to_remove = (array) array_intersect(
306 (array) $linked_roles_to_remove,
307 (array) array_keys($this->roles));
310 foreach ($linked_roles_to_remove as $role_id)
312 if ($rbacreview->isProtected($rolf_id,$role_id))
318 $role_obj->setParent($rolf_id);
331 if (!$rbacsystem->checkAccess(
"edit_permission",$this->gui_obj->object->getRefId()))
333 $this->ctrl->redirect($this->gui_obj);
336 $this->ctrl->redirect($this,
'perm');
341 global $rbacreview,$objDefinition;
343 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
345 $form->setFormAction($this->ctrl->getFormAction($this));
346 $form->setTitle($this->lng->txt(
'role_new'));
347 $form->addCommandButton(
'addrole',$this->lng->txt(
'role_new'));
348 $form->addCommandButton(
'perm', $this->lng->txt(
'cancel'));
351 $title->setValidationRegexp(
'/^(?!il_).*$/');
352 $title->setValidationFailureMessage($this->lng->txt(
'msg_role_reserved_prefix'));
355 $title->setRequired(
true);
361 $form->addItem(
$desc);
364 $pro->
setInfo($this->lng->txt(
'role_protect_permissions_desc'));
366 $form->addItem($pro);
369 $pd->
setInfo($this->lng->txt(
'rbac_role_add_to_desktop_info'));
374 $option =
new ilRadioOption($this->lng->txt(
"rbac_role_rights_copy_empty"), 0);
375 $rights->addOption($option);
377 $parent_role_ids = $rbacreview->getParentRoleIds($this->gui_obj->object->getRefId(),
true);
379 foreach($parent_role_ids as $id => $tmp)
385 $sorted_ids =
ilUtil::_sortIds($ids,
'object_data',
'type DESC,title',
'obj_id');
391 foreach($sorted_ids as $id)
393 $par = $parent_role_ids[$id];
394 if ($par[
"obj_id"] != SYSTEM_ROLE_ID)
396 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
398 $option->
setInfo($par[
"desc"]);
399 $rights->addOption($option);
403 $form->addItem($rights);
406 if($objDefinition->isContainer($this->getCurrentObject()->getType()))
408 $check =
new ilCheckboxInputGui($this->lng->txt(
"rbac_role_rights_copy_change_existing"),
'existing');
409 $check->setInfo($this->lng->txt(
'rbac_change_existing_objects_desc_new_role'));
410 $form->addItem($check);
420 $this->tpl->setContent($form->getHTML());
435 if($form->checkInput())
437 $new_title = $form->getInput(
"title");
438 $rolf_data = $rbacreview->getRoleFolderOfObject($this->gui_obj->object->getRefId());
439 if($rolf_data[
'child'])
441 foreach($rbacreview->getRolesOfRoleFolder($rolf_data[
'child']) as $role_id)
445 $ilErr->raiseError($this->lng->txt(
'rbac_role_exists_alert'),$ilErr->MESSAGE);
451 if ($this->gui_obj->object->getType() !=
"rolf")
453 $rolf_data = $rbacreview->getRoleFolderOfObject($this->gui_obj->object->getRefId());
456 if (!($rolf_id = $rolf_data[
"child"]))
459 $subobjects = $this->objDefinition->getSubObjects($this->gui_obj->object->getType());
461 if (!isset($subobjects[
"rolf"]))
463 ilUtil::sendFailure($this->lng->txt(
"msg_no_rolf_allowed1").
" '".$this->gui_obj->object->getTitle().
"' ".
464 $this->lng->txt(
"msg_no_rolf_allowed2"),
true);
465 $ilCtrl->redirect($this,
"perm");
469 $rolfObj = $this->gui_obj->object->createRoleFolder();
470 $rolf_id = $rolfObj->getRefId();
476 $rolf_id = $this->gui_obj->object->getRefId();
480 if ($this->gui_obj->object->getType() ==
"rolf")
482 $roleObj = $this->gui_obj->object->createRole($new_title, $form->getInput(
"desc"));
487 $roleObj = $rfoldObj->createRole($new_title, $form->getInput(
"desc"));
491 $rbacadmin->setProtected(
494 $form->getInput(
'pro') ?
'y' :
'n'
498 $right_id_to_copy = $form->getInput(
"rights");
499 if($right_id_to_copy)
501 $parentRoles = $rbacreview->getParentRoleIds($rolf_id,
true);
502 $rbacadmin->copyRoleTemplatePermissions(
504 $parentRoles[$right_id_to_copy][
"parent"],
509 if($form->getInput(
'existing'))
511 if($form->getInput(
'pro'))
513 $roleObj->changeExistingObjects(
514 $this->gui_obj->object->getRefId(),
521 $roleObj->changeExistingObjects(
522 $this->gui_obj->object->getRefId(),
531 if($form->getInput(
"desktop"))
533 include_once
'Services/AccessControl/classes/class.ilRoleDesktopItem.php';
535 $role_desk_item_obj->
add($this->gui_obj->object->getRefId(),
ilObject::_lookupType($this->gui_obj->object->getRefId(),
true));
539 $this->ctrl->redirect($this,
'perm');
543 $form->setValuesByPost();
544 $this->tpl->setContent($form->getHTML());
550 include_once
"Services/Table/classes/class.ilTableGUI.php";
564 case "clipboardObject":
565 $offset =
$_GET[
"offset"];
566 $order =
$_GET[
"sort_by"];
567 $direction =
$_GET[
"sort_order"];
568 $tbl->disable(
"footer");
572 $offset =
$_GET[
"offset"];
573 $order =
$_GET[
"sort_by"];
574 $direction =
$_GET[
"sort_order"];
578 $tbl->setOrderColumn($order);
579 $tbl->setOrderDirection($direction);
580 $tbl->setOffset($offset);
581 $tbl->setLimit(
$_GET[
"limit"]);
582 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
583 $tbl->setData($result_set);
589 $action[1] = $this->lng->txt(
'filter_all_roles');
590 $action[2] = $this->lng->txt(
'filter_global_roles');
591 $action[3] = $this->lng->txt(
'filter_local_roles');
592 $action[4] = $this->lng->txt(
'filter_roles_local_policy');
593 $action[5] = $this->lng->txt(
'filter_local_roles_object');
609 $arr_global_roles = $rbacreview->getGlobalRoles();
610 $arr_remove_roles = array_diff(array_keys($a_roles),$arr_global_roles);
612 foreach ($arr_remove_roles as $role_id)
614 unset($a_roles[$role_id]);
621 $arr_global_roles = $rbacreview->getGlobalRoles();
623 foreach ($arr_global_roles as $role_id)
625 unset($a_roles[$role_id]);
632 $role_folder = $rbacreview->getRoleFolderOfObject($this->gui_obj->object->getRefId());
639 $arr_local_roles = $rbacreview->getRolesOfRoleFolder($role_folder[
"ref_id"]);
640 $arr_remove_roles = array_diff(array_keys($a_roles),$arr_local_roles);
642 foreach ($arr_remove_roles as $role_id)
644 unset($a_roles[$role_id]);
652 $role_folder = $rbacreview->getRoleFolderOfObject($this->gui_obj->object->getRefId());
659 $arr_local_roles = $rbacreview->getRolesOfRoleFolder($role_folder[
"ref_id"],
false);
660 $arr_remove_roles = array_diff(array_keys($a_roles),$arr_local_roles);
662 foreach ($arr_remove_roles as $role_id)
664 unset($a_roles[$role_id]);
677 global $ilObjDataCache,$ilUser;
681 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.obj_owner.html');
683 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
686 $this->tpl->setVariable(
"TBL_TITLE_IMG_ALT",$this->lng->txt(
'owner'));
687 $this->tpl->setVariable(
"TBL_TITLE",$this->lng->txt(
'info_owner_of_object'));
688 $this->tpl->setVariable(
"BTN_CHOWN",$this->lng->txt(
'change_owner'));
689 $this->tpl->setVariable(
"TXT_USERNAME",$this->lng->txt(
'username'));
690 $this->tpl->setVariable(
"CHOWN_WARNING",$this->lng->txt(
'chown_warning'));
695 global $rbacsystem,
$ilErr,$ilObjDataCache;
704 $this->gui_obj->object->setOwner($user_id);
705 $this->gui_obj->object->updateOwner();
706 $ilObjDataCache->deleteCachedEntry($this->gui_obj->object->getId());
709 include_once
"Services/AccessControl/classes/class.ilRbacLog.php";
715 if (!$rbacsystem->checkAccess(
"edit_permission",$this->gui_obj->object->getRefId()))
717 $this->ctrl->redirect($this->gui_obj);
721 $this->ctrl->redirect($this,
'owner');
731 include_once(
'classes/class.ilObjectStatusGUI.php');
735 $this->tpl->setVariable(
"ADM_CONTENT",$ilInfo->getHTML());
743 $perm = ($a_cmd ==
'perm') ?
true :
false;
744 $info = ($a_cmd ==
'info') ?
true :
false;
745 $owner = ($a_cmd ==
'owner') ?
true :
false;
746 $log = ($a_cmd ==
'log') ?
true :
false;
748 $ilTabs->addSubTabTarget(
"permission_settings", $this->ctrl->getLinkTarget($this,
"perm"),
751 #$ilTabs->addSubTabTarget("permission_settings", $this->ctrl->getLinkTarget($this, "perm2"),
752 # "", "", "", $perm);
754 $ilTabs->addSubTabTarget(
"info_status_info", $this->ctrl->getLinkTarget($this,
"info"),
756 $ilTabs->addSubTabTarget(
"owner", $this->ctrl->getLinkTarget($this,
"owner"),
759 include_once
"Services/AccessControl/classes/class.ilRbacLog.php";
762 $ilTabs->addSubTabTarget(
"log", $this->ctrl->getLinkTarget($this,
"log"),
769 global $rbacsystem, $rbacreview, $tree;
772 $roles = $rbacreview->getParentRoleIds($this->gui_obj->object->getRefId());
778 if (
$_SESSION[
'perm_filtered_roles'] == 0)
780 if ($tree->checkForParentType($this->gui_obj->object->getRefId(),
'crs') || $tree->checkForParentType($this->gui_obj->object->getRefId(),
'grp'))
792 $role_folder = $rbacreview->getRoleFolderOfObject($this->gui_obj->object->getRefId());
794 $local_roles = array();
796 if (!empty($role_folder))
798 $local_roles = $rbacreview->getRolesOfRoleFolder($role_folder[
"ref_id"]);
801 foreach ($roles as $key => $role)
804 if ($role[
"obj_id"] == SYSTEM_ROLE_ID)
810 $this->roles[$role[
'obj_id']] = $role;
813 $this->roles[$role[
'obj_id']][
'keep_protected'] = $rbacreview->isProtected($role[
'parent'],$role[
'obj_id']);
815 if (!in_array($role[
"obj_id"],$local_roles))
817 $this->roles[$role[
'obj_id']][
'local_policy_enabled'] =
false;
818 $this->roles[$role[
'obj_id']][
'local_policy_allowed'] =
true;
823 if ($rbacreview->isAssignable($role[
"obj_id"],$role_folder[
"ref_id"]))
825 $this->roles[$role[
'obj_id']][
'local_policy_allowed'] =
false;
829 $this->roles[$role[
'obj_id']][
'local_policy_enabled'] =
true;
830 $this->roles[$role[
'obj_id']][
'local_policy_allowed'] =
true;
836 foreach ($grouped_ops as $ops_group => $ops_data)
838 foreach ($ops_data as $key => $operation)
840 $grouped_ops[$ops_group][$key][
'checked'] = $rbacsystem->checkPermission($this->gui_obj->object->getRefId(), $role[
'obj_id'], $operation[
'name']);
844 $this->roles[$role[
'obj_id']][
'permissions'] = $grouped_ops;
852 global $objDefinition;
854 $this->tpl->setCurrentBlock(
"perm_subtitle");
855 $this->tpl->setVariable(
"TXT_PERM_CLASS",$this->lng->txt(
'perm_class_general'));
856 $this->tpl->setVariable(
"TXT_PERM_CLASS_DESC",$this->lng->txt(
'perm_class_general_desc'));
857 $this->tpl->setVariable(
"COLSPAN", $this->num_roles);
858 $this->tpl->parseCurrentBlock();
860 foreach ($this->roles as $role)
862 foreach ($role[
'permissions'][
'general'] as $perm)
865 if ($perm[
'name'] ==
'delete' and $this->gui_obj->object->getType() ==
'rolf' and $this->gui_obj->object->getRefId() != ROLE_FOLDER_ID)
870 $box = ilUtil::formCheckBox($perm[
'checked'],
"perm[".$role[
"obj_id"].
"][]",$perm[
"ops_id"],$role[
"protected"]);
872 $this->tpl->setCurrentBlock(
"perm_item");
873 $this->tpl->setVariable(
"PERM_CHECKBOX",$box);
874 $this->tpl->setVariable(
"PERM_NAME",$this->lng->txt($perm[
'name']));
875 if ($objDefinition->isPlugin($this->gui_obj->object->getType()))
877 $this->tpl->setVariable(
"PERM_TOOLTIP",
879 $this->gui_obj->object->getType().
"_".$perm[
'name']));
883 $this->tpl->setVariable(
"PERM_TOOLTIP",$this->lng->txt($this->gui_obj->object->getType().
"_".$perm[
'name']));
885 $this->tpl->setVariable(
"PERM_LABEL",
'perm_'.$role[
'obj_id'].
'_'.$perm[
'ops_id']);
886 $this->tpl->parseCurrentBlock();
889 $this->tpl->setCurrentBlock(
"perm_table");
890 $this->tpl->parseCurrentBlock();
893 $this->tpl->setCurrentBlock(
"perm_settings");
894 $this->tpl->parseCurrentBlock();
899 global $objDefinition;
903 $first_role =& current($this->roles);
905 if (count($first_role[
'permissions'][
'object']))
907 $this->tpl->setCurrentBlock(
"perm_subtitle");
908 $this->tpl->setVariable(
"TXT_PERM_CLASS",$this->lng->txt(
'perm_class_object'));
909 $this->tpl->setVariable(
"TXT_PERM_CLASS_DESC",$this->lng->txt(
'perm_class_object_desc'));
910 $this->tpl->setVariable(
"COLSPAN", $this->num_roles);
911 $this->tpl->parseCurrentBlock();
913 foreach ($this->roles as $role)
915 foreach ($role[
'permissions'][
'object'] as $perm)
917 $box = ilUtil::formCheckBox($perm[
'checked'],
"perm[".$role[
"obj_id"].
"][]",$perm[
"ops_id"],$role[
"protected"]);
919 $this->tpl->setCurrentBlock(
"perm_item");
920 $this->tpl->setVariable(
"PERM_CHECKBOX",$box);
921 $this->tpl->setVariable(
"PERM_NAME",$this->lng->txt($this->gui_obj->object->getType().
"_".$perm[
'name']));
922 if ($objDefinition->isPlugin($this->gui_obj->object->getType()))
924 $this->tpl->setVariable(
"PERM_TOOLTIP",
926 $this->gui_obj->object->getType().
"_".$perm[
'name']));
930 $this->tpl->setVariable(
"PERM_TOOLTIP",$this->lng->txt($this->gui_obj->object->getType().
"_".$perm[
'name']));
932 $this->tpl->setVariable(
"PERM_LABEL",
'perm_'.$role[
'obj_id'].
'_'.$perm[
'ops_id']);
933 $this->tpl->parseCurrentBlock();
936 $this->tpl->setCurrentBlock(
"perm_table");
937 $this->tpl->parseCurrentBlock();
940 $this->tpl->setCurrentBlock(
"perm_settings");
941 $this->tpl->parseCurrentBlock();
947 global $objDefinition;
949 $this->tpl->setCurrentBlock(
"perm_subtitle");
950 $this->tpl->setVariable(
"TXT_PERM_CLASS",$this->lng->txt(
'perm_class_rbac'));
951 $this->tpl->setVariable(
"TXT_PERM_CLASS_DESC",$this->lng->txt(
'perm_class_rbac_desc'));
952 $this->tpl->setVariable(
"COLSPAN", $this->num_roles);
953 $this->tpl->parseCurrentBlock();
955 foreach ($this->roles as $role)
957 foreach ($role[
'permissions'][
'rbac'] as $perm)
959 $box = ilUtil::formCheckBox($perm[
'checked'],
"perm[".$role[
"obj_id"].
"][]",$perm[
"ops_id"],$role[
"protected"]);
961 $this->tpl->setCurrentBlock(
"perm_item");
962 $this->tpl->setVariable(
"PERM_CHECKBOX",$box);
963 $this->tpl->setVariable(
"PERM_NAME",$this->lng->txt(
'perm_administrate'));
964 if ($objDefinition->isPlugin($this->gui_obj->object->getType()))
966 $this->tpl->setVariable(
"PERM_TOOLTIP",
968 $this->gui_obj->object->getType().
"_".$perm[
'name']));
972 $this->tpl->setVariable(
"PERM_TOOLTIP",$this->lng->txt($this->gui_obj->object->getType().
"_".$perm[
'name']));
974 $this->tpl->setVariable(
"PERM_LABEL",
'perm_'.$role[
'obj_id'].
'_'.$perm[
'ops_id']);
975 $this->tpl->parseCurrentBlock();
980 if ($this->objDefinition->stopInheritance($this->gui_obj->object->getType()))
982 if ($role[
'local_policy_allowed'])
984 $box = ilUtil::formCheckBox($role[
'local_policy_enabled'],
'stop_inherit[]',$role[
'obj_id'],$role[
'keep_protected']);
985 $lang = $this->lng->txt(
"perm_use_local_policy").
" (".
986 $this->lng->txt(
"stop_inheritance").
")";
987 $lang_desc = $this->lng->txt(
"perm_use_local_policy_desc");
992 $lang = $this->lng->txt(
"perm_local_role");
993 $lang_desc = $this->lng->txt(
"perm_local_role_desc");
996 $this->tpl->setCurrentBlock(
"perm_item");
997 $this->tpl->setVariable(
"PERM_CHECKBOX",$box);
998 $this->tpl->setVariable(
"PERM_NAME",
$lang);
999 $this->tpl->setVariable(
"PERM_TOOLTIP",$lang_desc);
1000 $this->tpl->setVariable(
"PERM_LABEL",
'stop_inherit_'.$role[
'obj_id']);
1001 $this->tpl->parseCurrentBlock();
1004 $this->tpl->setCurrentBlock(
"perm_table");
1005 $this->tpl->parseCurrentBlock();
1008 $this->tpl->setCurrentBlock(
"perm_settings");
1009 $this->tpl->parseCurrentBlock();
1018 if ($this->gui_obj->object->getType() ==
'rolf' and $this->gui_obj->object->getRefId() != ROLE_FOLDER_ID)
1024 reset($this->roles);
1025 $first_role =& current($this->roles);
1027 if (count($first_role[
'permissions'][
'create']))
1029 $this->tpl->setCurrentBlock(
"perm_subtitle");
1030 $this->tpl->setVariable(
"TXT_PERM_CLASS",$this->lng->txt(
'perm_class_create'));
1031 $this->tpl->setVariable(
"TXT_PERM_CLASS_DESC",$this->lng->txt(
'perm_class_create_desc'));
1032 $this->tpl->setVariable(
"COLSPAN", $this->num_roles);
1033 $this->tpl->parseCurrentBlock();
1036 $container_arr = array(
'cat',
'grp',
'crs',
'fold');
1038 if (in_array($this->gui_obj->object->getType(),$container_arr))
1040 $chk_toggle_create =
true;
1043 foreach ($this->roles as $role)
1047 foreach ($role[
'permissions'][
'create'] as $perm)
1049 $ops_ids[] = $perm[
'ops_id'];
1052 if ($chk_toggle_create)
1054 $this->tpl->setCurrentBlock(
'chk_toggle_create');
1055 $this->tpl->setVariable(
'PERM_NAME',$this->lng->txt(
'check_all').
"/".$this->lng->txt(
'uncheck_all'));
1056 $this->tpl->setVariable(
'PERM_TOOLTIP',$this->lng->txt(
'check_all'));
1057 $this->tpl->setVariable(
'ROLE_ID',$role[
'obj_id']);
1058 $this->tpl->setVariable(
'JS_VARNAME',
'perm_'.$role[
'obj_id']);
1060 $this->tpl->parseCurrentBlock();
1063 foreach ($role[
'permissions'][
'create'] as $perm)
1065 if ($perm[
"name"] ==
"create_icrs" and !$ilSetting->get(
"ilinc_active"))
1070 $box = ilUtil::formCheckBox($perm[
'checked'],
"perm[".$role[
"obj_id"].
"][]",$perm[
"ops_id"],$role[
"protected"]);
1072 $this->tpl->setCurrentBlock(
"perm_item");
1073 $this->tpl->setVariable(
"PERM_CHECKBOX",$box);
1074 if ($objDefinition->isPlugin(substr($perm[
'name'],7)))
1076 $this->tpl->setVariable(
"PERM_NAME",
1078 "obj_".substr($perm[
'name'],7)));
1079 $this->tpl->setVariable(
"PERM_TOOLTIP",
1081 $this->gui_obj->object->getType().
"_".$perm[
'name']));
1085 $this->tpl->setVariable(
"PERM_NAME",$this->lng->txt(
"obj".substr($perm[
'name'],6)));
1086 $this->tpl->setVariable(
"PERM_TOOLTIP",$this->lng->txt($this->gui_obj->object->getType().
"_".$perm[
'name']));
1089 $this->tpl->setVariable(
"PERM_LABEL",
'perm_'.$role[
'obj_id'].
'_'.$perm[
'ops_id']);
1090 $this->tpl->parseCurrentBlock();
1093 $this->tpl->setCurrentBlock(
"perm_table");
1094 $this->tpl->parseCurrentBlock();
1097 $this->tpl->setCurrentBlock(
"perm_settings");
1098 $this->tpl->parseCurrentBlock();
1104 include_once
"Services/AccessControl/classes/class.ilRbacLog.php";
1107 $this->ctrl->redirect($this,
"perm");
1112 include_once
"Services/AccessControl/classes/class.ilRbacLogTableGUI.php";
1113 $table =
new ilRbacLogTableGUI($this,
"log", $this->gui_obj->object->getRefId());
1114 $this->tpl->setContent($table->getHTML());
1119 include_once
"Services/AccessControl/classes/class.ilRbacLogTableGUI.php";
1120 $table =
new ilRbacLogTableGUI($this,
"log", $this->gui_obj->object->getRefId());
1122 $table->writeFilterToSession();
1128 include_once
"Services/AccessControl/classes/class.ilRbacLogTableGUI.php";
1129 $table =
new ilRbacLogTableGUI($this,
"log", $this->gui_obj->object->getRefId());
1131 $table->resetFilter();