ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilObjRoleTemplateGUI.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 require_once "./Services/Object/classes/class.ilObjectGUI.php";
6 
18 {
24  var $type;
25 
37  function ilObjRoleTemplateGUI($a_data,$a_id,$a_call_by_reference)
38  {
39  global $lng;
40 
41  $lng->loadLanguageModule('rbac');
42 
43  $this->type = "rolt";
44  $this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,false);
45  $this->rolf_ref_id =& $this->ref_id;
46  $this->ctrl->saveParameter($this, "obj_id");
47  }
48 
49  function &executeCommand()
50  {
51  global $rbacsystem;
52 
53  $this->prepareOutput();
54 
55  $next_class = $this->ctrl->getNextClass($this);
56  $cmd = $this->ctrl->getCmd();
57 
58  switch($next_class)
59  {
60  default:
61  if(!$cmd)
62  {
63  $cmd = "perm";
64  }
65  $cmd .= "Object";
66  $this->$cmd();
67 
68  break;
69  }
70 
71  return true;
72  }
73 
74 
80  function createObject()
81  {
82  global $rbacsystem;
83 
84  if (!$rbacsystem->checkAccess("create_rolt", $this->rolf_ref_id))
85  {
86  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
87  }
88  else
89  {
90  // fill in saved values in case of error
91  $data = array();
92  $data["fields"] = array();
93  $data["fields"]["title"] = ilUtil::prepareFormOutput($_SESSION["error_post_vars"]["Fobject"]["title"],true);
94  $data["fields"]["desc"] = ilUtil::stripSlashes($_SESSION["error_post_vars"]["Fobject"]["desc"]);
95 
96  $this->tpl->addBlockfile('ADM_CONTENT','adm_content','tpl.role_edit.html','Services/AccessControl');
97 
98  foreach ($data["fields"] as $key => $val)
99  {
100  $this->tpl->setVariable("TXT_".strtoupper($key), $this->lng->txt($key));
101  $this->tpl->setVariable(strtoupper($key), $val);
102 
103  if ($this->prepare_output)
104  {
105  $this->tpl->parseCurrentBlock();
106  }
107  }
108 
109  $this->tpl->setCurrentBlock("protect_permissions");
110  $protect_permissions = $_SESSION["error_post_vars"]["Fobject"]["protect_permissions"] ? "checked=\"checked\"" : "";
111  $this->tpl->setVariable("TXT_PROTECT_PERMISSIONS",$this->lng->txt("role_protect_permissions"));
112  $this->tpl->setVariable("PROTECT_PERMISSIONS",$protect_permissions);
113  $this->tpl->parseCurrentBlock();
114 
115  $this->ctrl->setParameter($this, "new_type", $this->type);
116  $this->tpl->setVariable("FORMACTION",
117  $this->ctrl->getFormAction($this));
118  $this->tpl->setVariable("TXT_HEADER", $this->lng->txt($this->type."_new"));
119  $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
120  $this->tpl->setVariable("TXT_SUBMIT", $this->lng->txt($this->type."_add"));
121  $this->tpl->setVariable("CMD_SUBMIT", "save");
122  $this->tpl->setVariable("TARGET", $this->getTargetFrame("save"));
123  $this->tpl->setVariable("TXT_REQUIRED_FLD", $this->lng->txt("required_field"));
124  }
125  }
126 
127 
133  function saveObject()
134  {
135  global $rbacsystem,$rbacadmin, $rbacreview;
136 
137  // CHECK ACCESS 'write' to role folder
138  // TODO: check for create role permission should be better
139  if (!$rbacsystem->checkAccess("create_rolt",$this->rolf_ref_id))
140  {
141  $this->ilias->raiseError($this->lng->txt("msg_no_perm_create_rolt"),$this->ilias->error_obj->WARNING);
142  }
143 
144  // check required fields
145  if (empty($_POST["Fobject"]["title"]))
146  {
147  $this->ilias->raiseError($this->lng->txt("fill_out_all_required_fields"),$this->ilias->error_obj->MESSAGE);
148  }
149 
150  // check if role title has il_ prefix
151  if (substr($_POST["Fobject"]["title"],0,3) == "il_")
152  {
153  $this->ilias->raiseError($this->lng->txt("msg_role_reserved_prefix"),$this->ilias->error_obj->MESSAGE);
154  }
155 
156  // create new rolt object
157  include_once("./Services/AccessControl/classes/class.ilObjRoleTemplate.php");
158  $roltObj = new ilObjRoleTemplate();
159  $roltObj->setTitle(ilUtil::stripSlashes($_POST["Fobject"]["title"]));
160  $roltObj->setDescription(ilUtil::stripSlashes($_POST["Fobject"]["desc"]));
161  $roltObj->create();
162  $rbacadmin->assignRoleToFolder($roltObj->getId(), $this->rolf_ref_id,'n');
163  $rbacadmin->setProtected($this->rolf_ref_id,$roltObj->getId(),ilUtil::tf2yn($_POST["Fobject"]["protect_permissions"]));
164 
165  ilUtil::sendSuccess($this->lng->txt("rolt_added"),true);
166  $this->ctrl->returnToParent($this);
167  }
168 
174  function permObject()
175  {
176  global $rbacadmin, $rbacreview, $rbacsystem,$objDefinition;
177 
178  if (!$rbacsystem->checkAccess('write',$this->rolf_ref_id))
179  {
180  $this->ilias->raiseError($this->lng->txt("msg_no_perm_perm"),$this->ilias->error_obj->WARNING);
181  exit();
182  }
183 
184  $to_filter = $objDefinition->getSubobjectsToFilter();
185 
186  $tpl_filter = array();
187  $internal_tpl = false;
188 
189  if (($internal_tpl = $this->object->isInternalTemplate()))
190  {
191  $tpl_filter = $this->object->getFilterOfInternalTemplate();
192  }
193 
194  $operation_info = $rbacreview->getOperationAssignment();
195 
196  foreach($operation_info as $info)
197  {
198  if($objDefinition->getDevMode($info['type']))
199  {
200  continue;
201  }
202  // FILTER SUBOJECTS OF adm OBJECT
203  if(in_array($info['type'],$to_filter))
204  {
205  continue;
206  }
207  if ($internal_tpl and $tpl_filter and !in_array($info['type'],$tpl_filter))
208  {
209  continue;
210  }
211  $rbac_objects[$info['typ_id']] = array("obj_id" => $info['typ_id'],
212  "type" => $info['type']);
213 
214  $txt = $objDefinition->isPlugin($info['type'])
215  ? ilPlugin::lookupTxt("rep_robj", $info['type'], $info['type']."_".$info['operation'])
216  : $this->lng->txt($info['type']."_".$info['operation']);
217  if (substr($info['operation'], 0, 7) == "create_" &&
218  $objDefinition->isPlugin(substr($info['operation'], 7)))
219  {
220  $txt = ilPlugin::lookupTxt("rep_robj", substr($info['operation'], 7), $info['type']."_".$info['operation']);
221  }
222  elseif(substr($info['operation'],0,6) == 'create')
223  {
224  $txt = $this->lng->txt('rbac_'.$info['operation']);
225  }
226 
227  $rbac_operations[$info['typ_id']][$info['ops_id']] = array(
228  "ops_id" => $info['ops_id'],
229  "title" => $info['operation'],
230  "name" => $txt);
231  }
232 
233  foreach ($rbac_objects as $key => $obj_data)
234  {
235  if ($objDefinition->isPlugin($obj_data["type"]))
236  {
237  $rbac_objects[$key]["name"] = ilPlugin::lookupTxt("rep_robj", $obj_data["type"],
238  "obj_".$obj_data["type"]);
239  }
240  else
241  {
242  $rbac_objects[$key]["name"] = $this->lng->txt("obj_".$obj_data["type"]);
243  }
244 
245  $rbac_objects[$key]["ops"] = $rbac_operations[$key];
246  }
247 
248  sort($rbac_objects);
249 
250  foreach ($rbac_objects as $key => $obj_data)
251  {
252  sort($rbac_objects[$key]["ops"]);
253  }
254 
255  // sort by (translated) name of object type
256  $rbac_objects = ilUtil::sortArray($rbac_objects,"name","asc");
257 
258  // BEGIN CHECK_PERM
259  foreach ($rbac_objects as $key => $obj_data)
260  {
261  $arr_selected = $rbacreview->getOperationsOfRole($this->object->getId(), $obj_data["type"], $this->rolf_ref_id);
262  $arr_checked = array_intersect($arr_selected,array_keys($rbac_operations[$obj_data["obj_id"]]));
263 
264  foreach ($rbac_operations[$obj_data["obj_id"]] as $operation)
265  {
266  $checked = in_array($operation["ops_id"],$arr_checked);
267  $disabled = false;
268 
269  // Es wird eine 2-dim Post Variable �bergeben: perm[rol_id][ops_id]
270  $box = ilUtil::formCheckBox($checked,"template_perm[".$obj_data["type"]."][]",$operation["ops_id"],$disabled);
271  $output["perm"][$obj_data["obj_id"]][$operation["ops_id"]] = $box;
272  }
273  }
274  // END CHECK_PERM
275 
276  $output["col_anz"] = count($rbac_objects);
277  $output["txt_save"] = $this->lng->txt("save");
278  $output["check_protected"] = ilUtil::formCheckBox($rbacreview->isProtected($this->rolf_ref_id,$this->object->getId()),"protected",1);
279  $output["text_protected"] = $this->lng->txt("role_protect_permissions");
280 
281 /************************************/
282 /* adopt permissions form */
283 /************************************/
284 
285  $output["message_middle"] = $this->lng->txt("adopt_perm_from_template");
286 
287  // send message for system role
288  if ($this->object->getId() == SYSTEM_ROLE_ID)
289  {
290  $output["adopt"] = array();
291  ilUtil::sendFailure($this->lng->txt("msg_sysrole_not_editable"));
292  }
293  else
294  {
295  // BEGIN ADOPT_PERMISSIONS
296  $parent_role_ids = $rbacreview->getParentRoleIds($this->rolf_ref_id,true);
297 
298  // sort output for correct color changing
299  ksort($parent_role_ids);
300 
301  foreach ($parent_role_ids as $key => $par)
302  {
303  if ($par["obj_id"] != SYSTEM_ROLE_ID)
304  {
305  $radio = ilUtil::formRadioButton(0,"adopt",$par["obj_id"]);
306  $output["adopt"][$key]["css_row_adopt"] = ilUtil::switchColor($key, "tblrow1", "tblrow2");
307  $output["adopt"][$key]["check_adopt"] = $radio;
308  $output["adopt"][$key]["type"] = ($par["type"] == 'role' ? 'Role' : 'Template');
309  $output["adopt"][$key]["role_name"] = $par["title"];
310  }
311  }
312 
313  $output["formaction_adopt"] = $this->ctrl->getFormAction($this);
314  // END ADOPT_PERMISSIONS
315  }
316 
317  $output["formaction"] =
318  $this->ctrl->getFormAction($this);
319 
320  $this->data = $output;
321 
322 
323 /************************************/
324 /* generate output */
325 /************************************/
326 
327  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.adm_perm_role.html",
328  "Services/AccessControl");
329 
330  foreach ($rbac_objects as $obj_data)
331  {
332  // BEGIN object_operations
333  $this->tpl->setCurrentBlock("object_operations");
334 
335  foreach ($obj_data["ops"] as $operation)
336  {
337  $ops_ids[] = $operation["ops_id"];
338 
339  $css_row = ilUtil::switchColor($key, "tblrow1", "tblrow2");
340  $this->tpl->setVariable("CSS_ROW",$css_row);
341  $this->tpl->setVariable("PERMISSION",$operation["name"]);
342  $this->tpl->setVariable("CHECK_PERMISSION",$this->data["perm"][$obj_data["obj_id"]][$operation["ops_id"]]);
343  $this->tpl->parseCurrentBlock();
344  } // END object_operations
345 
346  // BEGIN object_type
347  $this->tpl->setCurrentBlock("object_type");
348  $this->tpl->setVariable("TXT_OBJ_TYPE",$obj_data["name"]);
349 
350 // TODO: move this if in a function and query all objects that may be disabled or inactive
351  if ($this->objDefinition->getDevMode($obj_data["type"]))
352  {
353  $this->tpl->setVariable("TXT_NOT_IMPL", "(".$this->lng->txt("not_implemented_yet").")");
354  }
355  else if ($obj_data["type"] == "icrs" and !$this->ilias->getSetting("ilinc_active"))
356  {
357  $this->tpl->setVariable("TXT_NOT_IMPL", "(".$this->lng->txt("not_enabled_or_configured").")");
358  }
359 
360  // js checkbox toggles
361  $this->tpl->setVariable("JS_VARNAME","template_perm_".$obj_data["type"]);
362  $this->tpl->setVariable("JS_ONCLICK",ilUtil::array_php2js($ops_ids));
363  $this->tpl->setVariable("TXT_CHECKALL", $this->lng->txt("check_all"));
364  $this->tpl->setVariable("TXT_UNCHECKALL", $this->lng->txt("uncheck_all"));
365 
366 
367  $this->tpl->parseCurrentBlock();
368  // END object_type
369  }
370 
371  /*
372  // BEGIN ADOPT PERMISSIONS
373  foreach ($this->data["adopt"] as $key => $value)
374  {
375  $this->tpl->setCurrentBlock("ADOPT_PERM_ROW");
376  $this->tpl->setVariable("CSS_ROW_ADOPT",$value["css_row_adopt"]);
377  $this->tpl->setVariable("CHECK_ADOPT",$value["check_adopt"]);
378  $this->tpl->setVariable("TYPE",$value["type"]);
379  $this->tpl->setVariable("ROLE_NAME",$value["role_name"]);
380  $this->tpl->parseCurrentBlock();
381  }
382 
383  $this->tpl->setCurrentBlock("ADOPT_PERM_FORM");
384  $this->tpl->setVariable("MESSAGE_MIDDLE",$this->data["message_middle"]);
385  $this->tpl->setVariable("FORMACTION_ADOPT",$this->data["formaction_adopt"]);
386  $this->tpl->setVariable("ADOPT",$this->lng->txt('copy'));
387  $this->tpl->parseCurrentBlock();
388  // END ADOPT PERMISSIONS
389  */
390 
391  $this->tpl->setCurrentBlock("tblfooter_protected");
392  $this->tpl->setVariable("COL_ANZ",3);
393  $this->tpl->setVariable("CHECK_BOTTOM",$this->data["check_protected"]);
394  $this->tpl->setVariable("MESSAGE_TABLE",$this->data["text_protected"]);
395  $this->tpl->parseCurrentBlock();
396 
397  $this->tpl->setVariable("COL_ANZ_PLUS",4);
398  $this->tpl->setVariable("TXT_SAVE",$this->data["txt_save"]);
399 
400  $this->tpl->setCurrentBlock("adm_content");
401  $this->tpl->setVariable("TBL_TITLE_IMG",ilUtil::getImagePath("icon_".$this->object->getType().".png"));
402  $this->tpl->setVariable("TBL_TITLE_IMG_ALT",$this->lng->txt($this->object->getType()));
403  $this->tpl->setVariable("TBL_HELP_IMG",ilUtil::getImagePath("icon_help.png"));
404  $this->tpl->setVariable("TBL_HELP_LINK","tbl_help.php");
405  $this->tpl->setVariable("TBL_HELP_IMG_ALT",$this->lng->txt("help"));
406 
407  // compute additional information in title
408  if (substr($this->object->getTitle(),0,3) == "il_")
409  {
410  $desc = $this->lng->txt("predefined_template");//$this->lng->txt("obj_".$parent_node['type'])." (".$parent_node['obj_id'].") : ".$parent_node['title'];
411  }
412 
413  $description = "<br/>&nbsp;<span class=\"small\">".$desc."</span>";
414 
415  // translation for autogenerated roles
416  if (substr($this->object->getTitle(),0,3) == "il_")
417  {
418  include_once('./Services/AccessControl/classes/class.ilObjRole.php');
419 
420  $title = ilObjRole::_getTranslation($this->object->getTitle())." (".$this->object->getTitle().")";
421  }
422  else
423  {
424  $title = $this->object->getTitle();
425  }
426 
427  $this->tpl->setVariable("TBL_TITLE",$title.$description);
428 
429  $this->tpl->setVariable("TXT_PERMISSION",$this->data["txt_permission"]);
430  $this->tpl->setVariable("FORMACTION",$this->data["formaction"]);
431  $this->tpl->parseCurrentBlock();
432  }
433 
434 
440  function permSaveObject()
441  {
442  global $rbacadmin, $rbacsystem, $rbacreview,$objDefinition;
443 
444  if (!$rbacsystem->checkAccess('write',$this->rolf_ref_id))
445  {
446  $this->ilias->raiseError($this->lng->txt("msg_no_perm_perm"),$this->ilias->error_obj->WARNING);
447  }
448  else
449  {
450  // Alle Template Eintraege loeschen
451  $rbacadmin->deleteRolePermission($this->object->getId(), $this->rolf_ref_id);
452 
453  foreach ($_POST["template_perm"] as $key => $ops_array)
454  {
455  // Setzen der neuen template permissions
456  $rbacadmin->setRolePermission($this->object->getId(), $key,$ops_array,$this->rolf_ref_id);
457  }
458  }
459 
460  // update object data entry (to update last modification date)
461  $this->object->update();
462 
463  // set protected flag
464  // not applicable for role templates
465  #$rbacadmin->setProtected($this->rolf_ref_id,$this->object->getId(),ilUtil::tf2yn($_POST['protected']));
466 
467  ilUtil::sendSuccess($this->lng->txt("saved_successfully"),true);
468 
469  $this->ctrl->redirect($this, "perm");
470  }
471 
478  {
479  global $rbacadmin, $rbacsystem, $rbacreview;
480 
481  if (!$rbacsystem->checkAccess('write',$this->rolf_ref_id))
482  {
483  $this->ilias->raiseError($this->lng->txt("msg_no_perm_perm"),$this->ilias->error_obj->WARNING);
484  }
485  elseif ($this->obj_id == $_POST["adopt"])
486  {
487  ilUtil::sendFailure($this->lng->txt("msg_perm_adopted_from_itself"),true);
488  }
489  else
490  {
491  $rbacadmin->deleteRolePermission($this->obj_id, $this->rolf_ref_id);
492  $parentRoles = $rbacreview->getParentRoleIds($this->rolf_ref_id,true);
493  $rbacadmin->copyRoleTemplatePermissions($_POST["adopt"],$parentRoles[$_POST["adopt"]]["parent"],
494  $this->rolf_ref_id,$this->obj_id);
495  // update object data entry (to update last modification date)
496  $this->object->update();
497 
498  // send info
499  $obj_data =& $this->ilias->obj_factory->getInstanceByObjId($_POST["adopt"]);
500  ilUtil::sendSuccess($this->lng->txt("msg_perm_adopted_from1")." '".$obj_data->getTitle()."'.<br/>".$this->lng->txt("msg_perm_adopted_from2"),true);
501  }
502 
503  $this->ctrl->redirect($this, "perm");
504  }
505 
511  function editObject()
512  {
513  global $rbacsystem, $rbacreview;
514 
515  if (!$rbacsystem->checkAccess("write", $this->rolf_ref_id))
516  {
517  $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
518  }
519 
520  $this->tpl->addBlockfile('ADM_CONTENT','adm_content','tpl.role_edit.html','Services/AccessControl');
521 
522  if ($_SESSION["error_post_vars"])
523  {
524  // fill in saved values in case of error
525  if (substr($this->object->getTitle(),0,3) != "il_")
526  {
527  $this->tpl->setVariable("TITLE",ilUtil::prepareFormOutput($_SESSION["error_post_vars"]["Fobject"]["title"]),true);
528  }
529 
530  $this->tpl->setVariable("DESC",ilUtil::stripSlashes($_SESSION["error_post_vars"]["Fobject"]["desc"]));
531  $protect_permissions = ($_SESSION["error_post_vars"]["Fobject"]["protect_permissions"]) ? "checked=\"checked\"" : "";
532  }
533  else
534  {
535  if (substr($this->object->getTitle(),0,3) != "il_")
536  {
537  $this->tpl->setVariable("TITLE",ilUtil::prepareFormOutput($this->object->getTitle()));
538  }
539 
540  $this->tpl->setVariable("DESC",ilUtil::stripSlashes($this->object->getDescription()));
541  $protect_permissions = $rbacreview->isProtected($this->rolf_ref_id,$this->object->getId()) ? "checked=\"checked\"" : "";
542  }
543 
544  $obj_str = "&obj_id=".$this->obj_id;
545 
546  $this->tpl->setVariable("TXT_TITLE",$this->lng->txt("title"));
547  $this->tpl->setVariable("TXT_DESC",$this->lng->txt("desc"));
548 
549  $this->tpl->setCurrentBlock("protect_permissions");
550  $this->tpl->setVariable("TXT_PROTECT_PERMISSIONS",$this->lng->txt('role_protect_permissions'));
551  $this->tpl->setVariable("PROTECT_PERMISSIONS",$protect_permissions);
552  $this->tpl->parseCurrentBlock();
553 
554  $this->tpl->setVariable("FORMACTION",
555  $this->ctrl->getFormAction($this));
556  $this->tpl->setVariable("TXT_HEADER", $this->lng->txt($this->object->getType()."_edit"));
557  $this->tpl->setVariable("TARGET", $this->getTargetFrame("update"));
558  $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
559  $this->tpl->setVariable("TXT_SUBMIT", $this->lng->txt("save"));
560  $this->tpl->setVariable("CMD_SUBMIT", "update");
561  $this->tpl->setVariable("TXT_REQUIRED_FLD", $this->lng->txt("required_field"));
562 
563  if (substr($this->object->getTitle(),0,3) == "il_")
564  {
565  $this->tpl->setVariable("SHOW_TITLE",$this->object->getTitle());
566  }
567  }
568 
572  function getAdminTabs(&$tabs_gui)
573  {
574  $this->getTabs($tabs_gui);
575  }
576 
577  function getTabs(&$tabs_gui)
578  {
579  global $rbacsystem,$rbacreview;
580 
581  if ($rbacsystem->checkAccess('write',$this->rolf_ref_id))
582  {
583  $tabs_gui->addTarget("edit_properties",
584  $this->ctrl->getLinkTarget($this, "edit"),
585  array("edit","update"), get_class($this));
586 
587  $tabs_gui->addTarget("default_perm_settings",
588  $this->ctrl->getLinkTarget($this, "perm"),
589  array("perm"), get_class($this));
590  }
591  }
592 
593 
598  function cancelObject()
599  {
600  $this->ctrl->redirectByClass("ilobjrolefoldergui","view");
601  }
602 
603 
604 
610  function updateObject()
611  {
612  global $rbacsystem, $rbacadmin, $rbacreview;
613 
614  // check write access
615  if (!$rbacsystem->checkAccess("write", $this->rolf_ref_id))
616  {
617  $this->ilias->raiseError($this->lng->txt("msg_no_perm_modify_rolt"),$this->ilias->error_obj->WARNING);
618  }
619 
620  if (substr($this->object->getTitle(),0,3) != "il_")
621  {
622  // check required fields
623  if (empty($_POST["Fobject"]["title"]))
624  {
625  $this->ilias->raiseError($this->lng->txt("fill_out_all_required_fields"),$this->ilias->error_obj->MESSAGE);
626  }
627 
628  // check if role title has il_ prefix
629  if (substr($_POST["Fobject"]["title"],0,3) == "il_")
630  {
631  $this->ilias->raiseError($this->lng->txt("msg_role_reserved_prefix"),$this->ilias->error_obj->MESSAGE);
632  }
633 
634  // update
635  $this->object->setTitle(ilUtil::stripSlashes($_POST["Fobject"]["title"]));
636  }
637 
638  $this->object->setDescription(ilUtil::stripSlashes($_POST["Fobject"]["desc"]));
639  $rbacadmin->setProtected($this->rolf_ref_id,$this->object->getId(),ilUtil::tf2yn($_POST["Fobject"]["protect_permissions"]));
640  $this->object->update();
641 
642  ilUtil::sendSuccess($this->lng->txt("saved_successfully"),true);
643 
644  $this->ctrl->returnToParent($this);
645  }
646 
652  {
653  global $ilLocator;
654 
655  $ilLocator->addItem($this->lng->txt("administration"),
656  $this->ctrl->getLinkTargetByClass("iladministrationgui", "frameset"),
657  ilFrameTargetInfo::_getFrame("MainContent"));
658 
659  $ilLocator->addItem(ilObject::_lookupTitle(
660  ilObject::_lookupObjId($_GET["ref_id"])),
661  $this->ctrl->getLinkTargetByClass("ilobjrolefoldergui", "view"));
662  }
663 
664 } // END class.ilObjRoleTemplateGUI
665 ?>