36 $this->ilias =& $ilias;
37 $this->objDefinition =& $objDefinition;
41 $this->lng->loadLanguageModule(
"rbac");
45 $this->gui_obj =& $a_gui_obj;
47 $this->roles = array();
54 global $rbacsystem,
$ilErr;
57 if (!$rbacsystem->checkAccess(
"edit_permission",$this->gui_obj->object->getRefId()))
59 $ilErr->raiseError($this->lng->txt(
"permission_denied"),$ilErr->MESSAGE);
62 $next_class = $this->ctrl->getNextClass($this);
67 include_once(
"Services/AccessControl/classes/class.ilObjRoleGUI.php");
69 $this->gui_obj->setBackTarget($this->lng->txt(
"perm_settings"),
70 $this->ctrl->getLinkTarget($this,
"perm"));
71 $ret =& $this->ctrl->forwardCommand($this->gui_obj);
75 $cmd = $this->ctrl->getCmd();
90 global $rbacsystem, $rbacreview;
100 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
101 "tpl.edit_permissions.html",
"Services/AccessControl");
103 $this->num_roles = count($this->roles);
106 $this->tpl->setCurrentBlock(
"filter");
107 $this->tpl->setVariable(
"FILTER_TXT_FILTER",$this->lng->txt(
'filter'));
109 $this->tpl->setVariable(
"FILTER_ACTION",$this->ctrl->getFormAction($this).
"&cmd=perm");
110 $this->tpl->setVariable(
"FILTER_NAME",
'view');
111 $this->tpl->setVariable(
"FILTER_VALUE",$this->lng->txt(
'apply_filter'));
112 $this->tpl->parseCurrentBlock();
115 if ($this->num_roles < 1)
122 $this->tpl->addBlockFile(
"PERM_PERMISSIONS",
"permissions",
"tpl.obj_perm_permissions.html");
124 $this->tpl->setVariable(
"TXT_TITLE", $this->lng->txt(
"permission_settings"));
126 $this->tpl->setVariable(
"TXT_TITLE_INFO",
127 sprintf($this->lng->txt(
"permission_settings_info"),
128 $this->gui_obj->object->getTitle()
130 $this->tpl->setVariable(
"COLSPAN", $this->num_roles);
131 $this->tpl->setVariable(
"FORMACTION",
132 $this->ctrl->getLinkTarget($this,
"permSave"));
133 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
136 $global_roles = $rbacreview->getGlobalRoles();
138 foreach ($this->roles as $role)
140 $tmp_role_folder = $rbacreview->getRoleFolderOfObject($this->gui_obj->object->getRefId());
141 $tmp_local_roles = array();
143 if ($tmp_role_folder)
145 $tmp_local_roles = $rbacreview->getRolesOfRoleFolder($tmp_role_folder[
"ref_id"]);
149 if ($role[
'protected'] ==
false and in_array($role[
'obj_id'],$tmp_local_roles))
151 $role_folder_data = $rbacreview->getRoleFolderOfObject(
$_GET[
'ref_id']);
152 $role_folder_id = $role_folder_data[
'ref_id'];
155 $this->tpl->setCurrentBlock(
"rolelink_open");
157 $up_path = defined(
'ILIAS_MODULE') ?
"../" :
"";
158 $this->ctrl->setParameterByClass(
"ilobjrolegui",
"obj_id",
160 $this->ctrl->setParameterByClass(
"ilobjrolegui",
"rolf_ref_id",
162 $this->tpl->setVariable(
"LINK_ROLE_RULESET",
163 $this->ctrl->getLinkTargetByClass(
"ilobjrolegui",
""));
165 $this->tpl->setVariable(
"TXT_ROLE_RULESET",$this->lng->txt(
"edit_perm_ruleset"));
166 $this->tpl->parseCurrentBlock();
168 $this->tpl->touchBlock(
"rolelink_close");
171 $this->tpl->setCurrentBlock(
"role_infos");
174 include_once (
'Services/AccessControl/classes/class.ilObjRole.php');
179 if (in_array($role[
"obj_id"],$global_roles))
181 $this->tpl->setVariable(
"ROLE_CONTEXT_TYPE",
"global");
185 if($rolf = $rbacreview->getFoldersAssignedToRole($role[
"obj_id"],
true))
187 $parent_node = $this->tree->getParentNodeData($rolf[0]);
190 $this->tpl->setVariable(
"ROLE_CONTEXT_TYPE",$parent_node[
"title"]);
194 $this->tpl->parseCurrentBlock();
196 $this->ctrl->clearParametersByClass(
"ilobjrolegui");
212 $this->tpl->setVariable(
"COLSPAN", $this->num_roles);
226 global $rbacreview, $rbacadmin, $rbacsystem;
230 foreach($this->roles as $role_id =>
$data)
232 $rbacadmin->revokePermission($this->gui_obj->object->getRefId(),$role_id);
235 if (is_array(
$_POST[
"perm"]))
237 foreach (
$_POST[
"perm"] as
$key => $new_role_perms)
239 $rbacadmin->grantPermission(
$key,$new_role_perms,$this->gui_obj->object->getRefId());
244 $this->gui_obj->object->update();
254 $rolf_data = $rbacreview->getRoleFolderOfObject($this->gui_obj->object->getRefId());
255 $rolf_id = $rolf_data[
"child"];
257 $stop_inherit_roles =
$_POST[
"stop_inherit"] ?
$_POST[
"stop_inherit"] : array();
259 if ($stop_inherit_roles)
265 $rfoldObj = $this->gui_obj->object->createRoleFolder();
268 $rolf_id = $rfoldObj->getRefId();
271 $roles_of_folder = $rbacreview->getRolesOfRoleFolder($rolf_id);
273 foreach ($stop_inherit_roles as $stop_inherit)
276 if (!in_array($stop_inherit,$roles_of_folder))
278 $parentRoles = $rbacreview->getParentRoleIds($rolf_id);
279 $rbacadmin->copyRoleTemplatePermissions($stop_inherit,$parentRoles[$stop_inherit][
"parent"],
280 $rolf_id,$stop_inherit);
281 $rbacadmin->assignRoleToFolder($stop_inherit,$rolf_id,
'n');
286 if ($rolf_id and $rolf_id != ROLE_FOLDER_ID)
289 $linked_roles = $rbacreview->getLinkedRolesOfRoleFolder($rolf_id);
290 $linked_roles_to_remove = array_diff($linked_roles,$stop_inherit_roles);
293 $linked_roles_to_remove = (array) array_intersect(
294 (array) $linked_roles_to_remove,
295 (array) array_keys($this->roles));
298 foreach ($linked_roles_to_remove as $role_id)
300 if ($rbacreview->isProtected($rolf_id,$role_id))
305 $role_obj =& $this->ilias->obj_factory->getInstanceByObjId($role_id);
306 $role_obj->setParent($rolf_id);
315 if (!$rbacsystem->checkAccess(
"edit_permission",$this->gui_obj->object->getRefId()))
317 $this->ctrl->redirect($this->gui_obj);
320 $this->ctrl->redirect($this,
'perm');
337 if (substr(
$_POST[
"Fobject"][
"title"],0,3) ==
"il_")
339 $this->ilias->raiseError($this->lng->txt(
"msg_role_reserved_prefix"),$this->ilias->error_obj->MESSAGE);
341 if(!strlen(
$_POST[
"Fobject"][
"title"]))
343 $this->ilias->raiseError($this->lng->txt(
"fill_out_all_required_fields"),$this->ilias->error_obj->MESSAGE);
347 $rolf_data = $rbacreview->getRoleFolderOfObject($this->gui_obj->object->getRefId());
348 if($rolf_data[
'child'])
350 foreach($rbacreview->getRolesOfRoleFolder($rolf_data[
'child']) as $role_id)
354 $ilErr->raiseError($this->lng->txt(
'rbac_role_exists_alert'),$ilErr->MESSAGE);
361 if ($this->gui_obj->object->getType() !=
"rolf")
363 $rolf_data = $rbacreview->getRoleFolderOfObject($this->gui_obj->object->getRefId());
366 if (!($rolf_id = $rolf_data[
"child"]))
369 $subobjects = $this->objDefinition->getSubObjects($this->gui_obj->object->getType());
371 if (!isset($subobjects[
"rolf"]))
373 ilUtil::sendFailure($this->lng->txt(
"msg_no_rolf_allowed1").
" '".$this->gui_obj->object->getTitle().
"' ".
374 $this->lng->txt(
"msg_no_rolf_allowed2"),
true);
375 $ilCtrl->redirect($this,
"perm");
379 $rolfObj = $this->gui_obj->object->createRoleFolder();
380 $rolf_id = $rolfObj->getRefId();
386 $rolf_id = $this->gui_obj->object->getRefId();
390 if ($this->gui_obj->object->getType() ==
"rolf")
392 $roleObj = $this->gui_obj->object->createRole(
$_POST[
"Fobject"][
"title"],
$_POST[
"Fobject"][
"desc"]);
396 $rfoldObj = $this->ilias->obj_factory->getInstanceByRefId($rolf_id);
397 $roleObj = $rfoldObj->createRole(
$_POST[
"Fobject"][
"title"],
$_POST[
"Fobject"][
"desc"]);
417 $this->ctrl->redirect($this,
'perm');
422 include_once
"Services/Table/classes/class.ilTableGUI.php";
436 case "clipboardObject":
437 $offset =
$_GET[
"offset"];
438 $order =
$_GET[
"sort_by"];
439 $direction =
$_GET[
"sort_order"];
440 $tbl->disable(
"footer");
444 $offset =
$_GET[
"offset"];
445 $order =
$_GET[
"sort_by"];
446 $direction =
$_GET[
"sort_order"];
450 $tbl->setOrderColumn($order);
451 $tbl->setOrderDirection($direction);
452 $tbl->setOffset($offset);
453 $tbl->setLimit(
$_GET[
"limit"]);
454 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
455 $tbl->setData($result_set);
461 $action[1] = $this->lng->txt(
'filter_all_roles');
462 $action[2] = $this->lng->txt(
'filter_global_roles');
463 $action[3] = $this->lng->txt(
'filter_local_roles');
464 $action[4] = $this->lng->txt(
'filter_roles_local_policy');
465 $action[5] = $this->lng->txt(
'filter_local_roles_object');
480 $arr_global_roles = $rbacreview->getGlobalRoles();
481 $arr_remove_roles = array_diff(array_keys($a_roles),$arr_global_roles);
483 foreach ($arr_remove_roles as $role_id)
485 unset($a_roles[$role_id]);
492 $arr_global_roles = $rbacreview->getGlobalRoles();
494 foreach ($arr_global_roles as $role_id)
496 unset($a_roles[$role_id]);
503 $role_folder = $rbacreview->getRoleFolderOfObject($this->gui_obj->object->getRefId());
510 $arr_local_roles = $rbacreview->getRolesOfRoleFolder($role_folder[
"ref_id"]);
511 $arr_remove_roles = array_diff(array_keys($a_roles),$arr_local_roles);
513 foreach ($arr_remove_roles as $role_id)
515 unset($a_roles[$role_id]);
523 $role_folder = $rbacreview->getRoleFolderOfObject($this->gui_obj->object->getRefId());
530 $arr_local_roles = $rbacreview->getRolesOfRoleFolder($role_folder[
"ref_id"],
false);
531 $arr_remove_roles = array_diff(array_keys($a_roles),$arr_local_roles);
533 foreach ($arr_remove_roles as $role_id)
535 unset($a_roles[$role_id]);
548 global $ilObjDataCache,$ilUser;
552 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.obj_owner.html');
554 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
557 $this->tpl->setVariable(
"TBL_TITLE_IMG_ALT",$this->lng->txt(
'owner'));
558 $this->tpl->setVariable(
"TBL_TITLE",$this->lng->txt(
'info_owner_of_object'));
559 $this->tpl->setVariable(
"BTN_CHOWN",$this->lng->txt(
'change_owner'));
560 $this->tpl->setVariable(
"TXT_USERNAME",$this->lng->txt(
'username'));
561 $this->tpl->setVariable(
"CHOWN_WARNING",$this->lng->txt(
'chown_warning'));
566 global $rbacsystem,
$ilErr,$ilObjDataCache;
575 $this->gui_obj->object->setOwner($user_id);
576 $this->gui_obj->object->updateOwner();
577 $ilObjDataCache->deleteCachedEntry($this->gui_obj->object->getId());
580 if (!$rbacsystem->checkAccess(
"edit_permission",$this->gui_obj->object->getRefId()))
582 $this->ctrl->redirect($this->gui_obj);
586 $this->ctrl->redirect($this,
'owner');
596 include_once(
'classes/class.ilObjectStatusGUI.php');
600 $this->tpl->setVariable(
"ADM_CONTENT",$ilInfo->getHTML());
608 $perm = ($a_cmd ==
'perm') ?
true :
false;
609 $info = ($a_cmd ==
'info') ?
true :
false;
610 $owner = ($a_cmd ==
'owner') ?
true :
false;
612 $ilTabs->addSubTabTarget(
"permission_settings", $this->ctrl->getLinkTarget($this,
"perm"),
614 $ilTabs->addSubTabTarget(
"info_status_info", $this->ctrl->getLinkTarget($this,
"info"),
616 $ilTabs->addSubTabTarget(
"owner", $this->ctrl->getLinkTarget($this,
"owner"),
622 global $rbacsystem, $rbacreview, $tree;
625 $roles = $rbacreview->getParentRoleIds($this->gui_obj->object->getRefId());
631 if (
$_SESSION[
'perm_filtered_roles'] == 0)
633 if ($tree->checkForParentType($this->gui_obj->object->getRefId(),
'crs') || $tree->checkForParentType($this->gui_obj->object->getRefId(),
'grp'))
645 $role_folder = $rbacreview->getRoleFolderOfObject($this->gui_obj->object->getRefId());
647 $local_roles = array();
649 if (!empty($role_folder))
651 $local_roles = $rbacreview->getRolesOfRoleFolder($role_folder[
"ref_id"]);
654 foreach ($roles as
$key => $role)
657 if ($role[
"obj_id"] == SYSTEM_ROLE_ID)
663 $this->roles[$role[
'obj_id']] = $role;
666 $this->roles[$role[
'obj_id']][
'keep_protected'] = $rbacreview->isProtected($role[
'parent'],$role[
'obj_id']);
668 if (!in_array($role[
"obj_id"],$local_roles))
670 $this->roles[$role[
'obj_id']][
'local_policy_enabled'] =
false;
671 $this->roles[$role[
'obj_id']][
'local_policy_allowed'] =
true;
676 if ($rbacreview->isAssignable($role[
"obj_id"],$role_folder[
"ref_id"]))
678 $this->roles[$role[
'obj_id']][
'local_policy_allowed'] =
false;
682 $this->roles[$role[
'obj_id']][
'local_policy_enabled'] =
true;
683 $this->roles[$role[
'obj_id']][
'local_policy_allowed'] =
true;
689 foreach ($grouped_ops as $ops_group => $ops_data)
691 foreach ($ops_data as
$key => $operation)
693 $grouped_ops[$ops_group][
$key][
'checked'] = $rbacsystem->checkPermission($this->gui_obj->object->getRefId(), $role[
'obj_id'], $operation[
'name']);
697 $this->roles[$role[
'obj_id']][
'permissions'] = $grouped_ops;
706 $object_types_exclude = array(
"adm",
"root",
"objf",
"taxf");
709 $subobjects = $this->objDefinition->getSubObjects($this->gui_obj->object->getType());
710 if (!isset($subobjects[
"rolf"]))
715 if (!in_array($this->gui_obj->object->getType(),$object_types_exclude) and $this->gui_obj->object->getRefId() != ROLE_FOLDER_ID)
717 $this->tpl->addBlockFile(
"PERM_ADD_ROLE",
"add_local_roles",
"tpl.obj_perm_add_role.html");
721 $data[
"fields"] = array();
722 $data[
"fields"][
"title"] =
$_SESSION[
"error_post_vars"][
"Fobject"][
"title"];
723 $data[
"fields"][
"desc"] =
$_SESSION[
"error_post_vars"][
"Fobject"][
"desc"];
725 foreach (
$data[
"fields"] as
$key => $val)
727 $this->tpl->setVariable(
"TXT_LR_".strtoupper(
$key), $this->lng->txt(
$key));
728 $this->tpl->setVariable(strtoupper(
$key), $val);
731 $this->tpl->setVariable(
"FORMACTION_LR",
732 $this->ctrl->getLinkTarget($this,
"addRole"));
733 $this->tpl->setVariable(
"TXT_LR_HEADER", $this->lng->txt(
"you_may_add_local_roles"));
734 $this->tpl->setVariable(
"TXT_ADD_ROLE", $this->lng->txt(
"role_add_local"));
735 $this->tpl->setVariable(
"TXT_REQUIRED_FLD", $this->lng->txt(
"required_field"));
741 global $objDefinition;
743 $this->tpl->setCurrentBlock(
"perm_subtitle");
744 $this->tpl->setVariable(
"TXT_PERM_CLASS",$this->lng->txt(
'perm_class_general'));
745 $this->tpl->setVariable(
"TXT_PERM_CLASS_DESC",$this->lng->txt(
'perm_class_general_desc'));
746 $this->tpl->setVariable(
"COLSPAN", $this->num_roles);
747 $this->tpl->parseCurrentBlock();
749 foreach ($this->roles as $role)
751 foreach ($role[
'permissions'][
'general'] as $perm)
754 if ($perm[
'name'] ==
'delete' and $this->gui_obj->object->getType() ==
'rolf' and $this->gui_obj->object->getRefId() != ROLE_FOLDER_ID)
759 $box = ilUtil::formCheckBox($perm[
'checked'],
"perm[".$role[
"obj_id"].
"][]",$perm[
"ops_id"],$role[
"protected"]);
761 $this->tpl->setCurrentBlock(
"perm_item");
762 $this->tpl->setVariable(
"PERM_CHECKBOX",$box);
763 $this->tpl->setVariable(
"PERM_NAME",$this->lng->txt($perm[
'name']));
764 if ($objDefinition->isPlugin($this->gui_obj->object->getType()))
766 $this->tpl->setVariable(
"PERM_TOOLTIP",
768 $this->gui_obj->object->getType().
"_".$perm[
'name']));
772 $this->tpl->setVariable(
"PERM_TOOLTIP",$this->lng->txt($this->gui_obj->object->getType().
"_".$perm[
'name']));
774 $this->tpl->setVariable(
"PERM_LABEL",
'perm_'.$role[
'obj_id'].
'_'.$perm[
'ops_id']);
775 $this->tpl->parseCurrentBlock();
778 $this->tpl->setCurrentBlock(
"perm_table");
779 $this->tpl->parseCurrentBlock();
782 $this->tpl->setCurrentBlock(
"perm_settings");
783 $this->tpl->parseCurrentBlock();
788 global $objDefinition;
792 $first_role =& current($this->roles);
794 if (count($first_role[
'permissions'][
'object']))
796 $this->tpl->setCurrentBlock(
"perm_subtitle");
797 $this->tpl->setVariable(
"TXT_PERM_CLASS",$this->lng->txt(
'perm_class_object'));
798 $this->tpl->setVariable(
"TXT_PERM_CLASS_DESC",$this->lng->txt(
'perm_class_object_desc'));
799 $this->tpl->setVariable(
"COLSPAN", $this->num_roles);
800 $this->tpl->parseCurrentBlock();
802 foreach ($this->roles as $role)
804 foreach ($role[
'permissions'][
'object'] as $perm)
806 $box = ilUtil::formCheckBox($perm[
'checked'],
"perm[".$role[
"obj_id"].
"][]",$perm[
"ops_id"],$role[
"protected"]);
808 $this->tpl->setCurrentBlock(
"perm_item");
809 $this->tpl->setVariable(
"PERM_CHECKBOX",$box);
810 $this->tpl->setVariable(
"PERM_NAME",$this->lng->txt($this->gui_obj->object->getType().
"_".$perm[
'name']));
811 if ($objDefinition->isPlugin($this->gui_obj->object->getType()))
813 $this->tpl->setVariable(
"PERM_TOOLTIP",
815 $this->gui_obj->object->getType().
"_".$perm[
'name']));
819 $this->tpl->setVariable(
"PERM_TOOLTIP",$this->lng->txt($this->gui_obj->object->getType().
"_".$perm[
'name']));
821 $this->tpl->setVariable(
"PERM_LABEL",
'perm_'.$role[
'obj_id'].
'_'.$perm[
'ops_id']);
822 $this->tpl->parseCurrentBlock();
825 $this->tpl->setCurrentBlock(
"perm_table");
826 $this->tpl->parseCurrentBlock();
829 $this->tpl->setCurrentBlock(
"perm_settings");
830 $this->tpl->parseCurrentBlock();
836 global $objDefinition;
838 $this->tpl->setCurrentBlock(
"perm_subtitle");
839 $this->tpl->setVariable(
"TXT_PERM_CLASS",$this->lng->txt(
'perm_class_rbac'));
840 $this->tpl->setVariable(
"TXT_PERM_CLASS_DESC",$this->lng->txt(
'perm_class_rbac_desc'));
841 $this->tpl->setVariable(
"COLSPAN", $this->num_roles);
842 $this->tpl->parseCurrentBlock();
844 foreach ($this->roles as $role)
846 foreach ($role[
'permissions'][
'rbac'] as $perm)
848 $box = ilUtil::formCheckBox($perm[
'checked'],
"perm[".$role[
"obj_id"].
"][]",$perm[
"ops_id"],$role[
"protected"]);
850 $this->tpl->setCurrentBlock(
"perm_item");
851 $this->tpl->setVariable(
"PERM_CHECKBOX",$box);
852 $this->tpl->setVariable(
"PERM_NAME",$this->lng->txt(
'perm_administrate'));
853 if ($objDefinition->isPlugin($this->gui_obj->object->getType()))
855 $this->tpl->setVariable(
"PERM_TOOLTIP",
857 $this->gui_obj->object->getType().
"_".$perm[
'name']));
861 $this->tpl->setVariable(
"PERM_TOOLTIP",$this->lng->txt($this->gui_obj->object->getType().
"_".$perm[
'name']));
863 $this->tpl->setVariable(
"PERM_LABEL",
'perm_'.$role[
'obj_id'].
'_'.$perm[
'ops_id']);
864 $this->tpl->parseCurrentBlock();
869 if ($this->objDefinition->stopInheritance($this->gui_obj->object->getType()))
871 if ($role[
'local_policy_allowed'])
873 $box = ilUtil::formCheckBox($role[
'local_policy_enabled'],
'stop_inherit[]',$role[
'obj_id'],$role[
'keep_protected']);
874 $lang = $this->lng->txt(
"perm_use_local_policy").
" (".
875 $this->lng->txt(
"stop_inheritance").
")";
876 $lang_desc = $this->lng->txt(
"perm_use_local_policy_desc");
881 $lang = $this->lng->txt(
"perm_local_role");
882 $lang_desc = $this->lng->txt(
"perm_local_role_desc");
885 $this->tpl->setCurrentBlock(
"perm_item");
886 $this->tpl->setVariable(
"PERM_CHECKBOX",$box);
887 $this->tpl->setVariable(
"PERM_NAME",
$lang);
888 $this->tpl->setVariable(
"PERM_TOOLTIP",$lang_desc);
889 $this->tpl->setVariable(
"PERM_LABEL",
'stop_inherit_'.$role[
'obj_id']);
890 $this->tpl->parseCurrentBlock();
893 $this->tpl->setCurrentBlock(
"perm_table");
894 $this->tpl->parseCurrentBlock();
897 $this->tpl->setCurrentBlock(
"perm_settings");
898 $this->tpl->parseCurrentBlock();
903 global $objDefinition;
907 if ($this->gui_obj->object->getType() ==
'rolf' and $this->gui_obj->object->getRefId() != ROLE_FOLDER_ID)
914 $first_role =& current($this->roles);
916 if (count($first_role[
'permissions'][
'create']))
918 $this->tpl->setCurrentBlock(
"perm_subtitle");
919 $this->tpl->setVariable(
"TXT_PERM_CLASS",$this->lng->txt(
'perm_class_create'));
920 $this->tpl->setVariable(
"TXT_PERM_CLASS_DESC",$this->lng->txt(
'perm_class_create_desc'));
921 $this->tpl->setVariable(
"COLSPAN", $this->num_roles);
922 $this->tpl->parseCurrentBlock();
925 $container_arr = array(
'cat',
'grp',
'crs',
'fold');
927 if (in_array($this->gui_obj->object->getType(),$container_arr))
929 $chk_toggle_create =
true;
932 foreach ($this->roles as $role)
936 foreach ($role[
'permissions'][
'create'] as $perm)
938 $ops_ids[] = $perm[
'ops_id'];
941 if ($chk_toggle_create)
943 $this->tpl->setCurrentBlock(
'chk_toggle_create');
944 $this->tpl->setVariable(
'PERM_NAME',$this->lng->txt(
'check_all').
"/".$this->lng->txt(
'uncheck_all'));
945 $this->tpl->setVariable(
'PERM_TOOLTIP',$this->lng->txt(
'check_all'));
946 $this->tpl->setVariable(
'ROLE_ID',$role[
'obj_id']);
947 $this->tpl->setVariable(
'JS_VARNAME',
'perm_'.$role[
'obj_id']);
949 $this->tpl->parseCurrentBlock();
952 foreach ($role[
'permissions'][
'create'] as $perm)
954 if ($perm[
"name"] ==
"create_icrs" and !$this->ilias->getSetting(
"ilinc_active"))
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 if ($objDefinition->isPlugin(substr($perm[
'name'],7)))
965 $this->tpl->setVariable(
"PERM_NAME",
967 "obj_".substr($perm[
'name'],7)));
968 $this->tpl->setVariable(
"PERM_TOOLTIP",
970 $this->gui_obj->object->getType().
"_".$perm[
'name']));
974 $this->tpl->setVariable(
"PERM_NAME",$this->lng->txt(
"obj".substr($perm[
'name'],6)));
975 $this->tpl->setVariable(
"PERM_TOOLTIP",$this->lng->txt($this->gui_obj->object->getType().
"_".$perm[
'name']));
978 $this->tpl->setVariable(
"PERM_LABEL",
'perm_'.$role[
'obj_id'].
'_'.$perm[
'ops_id']);
979 $this->tpl->parseCurrentBlock();
982 $this->tpl->setCurrentBlock(
"perm_table");
983 $this->tpl->parseCurrentBlock();
986 $this->tpl->setCurrentBlock(
"perm_settings");
987 $this->tpl->parseCurrentBlock();