ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilObjRoleFolderGUI.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2006 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
24 require_once "./Services/Object/classes/class.ilObjectGUI.php";
25 
39 {
45  public $type;
46 
51  public function __construct($a_data, $a_id, $a_call_by_reference)
52  {
53  global $lng;
54 
55  $this->type = "rolf";
56  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
57  $lng->loadLanguageModule('rbac');
58  }
59 
60  public function executeCommand()
61  {
62  global $ilTabs;
63 
64  $next_class = $this->ctrl->getNextClass($this);
65  $cmd = $this->ctrl->getCmd();
66  $this->prepareOutput();
67 
68  switch ($next_class) {
69 
70  case 'ilpermissiongui':
71  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
72  $perm_gui = new ilPermissionGUI($this);
73  $ret =&$this->ctrl->forwardCommand($perm_gui);
74  break;
75 
76  default:
77  if (!$cmd) {
78  $cmd = "view";
79  }
80  $cmd .= "Object";
81  $this->$cmd();
82 
83  break;
84  }
85  return true;
86  }
87 
94  public function viewObject()
95  {
96  global $ilErr, $rbacsystem, $ilToolbar,$rbacreview,$ilTabs;
97 
98  $ilTabs->activateTab('view');
99 
100  if (!$rbacsystem->checkAccess('visible,read', $this->object->getRefId())) {
101  $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->MESSAGE);
102  }
103 
104 
105  if ($rbacsystem->checkAccess('create_role', $this->object->getRefId())) {
106  $this->ctrl->setParameter($this, 'new_type', 'role');
107  $ilToolbar->addButton(
108  $this->lng->txt('rolf_create_role'),
109  $this->ctrl->getLinkTarget($this, 'create')
110  );
111  }
112  if ($rbacsystem->checkAccess('create_rolt', $this->object->getRefId())) {
113  $this->ctrl->setParameter($this, 'new_type', 'rolt');
114  $ilToolbar->addButton(
115  $this->lng->txt('rolf_create_rolt'),
116  $this->ctrl->getLinkTarget($this, 'create')
117  );
118  $this->ctrl->clearParameters($this);
119  }
120 
121  if (
122  $rbacsystem->checkAccess('create_rolt', $this->object->getRefId()) ||
123  $rbacsystem->checkAccess('create_rolt', $this->object->getRefId())
124  ) {
125  $ilToolbar->addButton(
126  $this->lng->txt('rbac_import_role'),
127  $this->ctrl->getLinkTargetByClass('ilPermissionGUI', 'displayImportRoleForm')
128  );
129  }
130 
131  include_once './Services/AccessControl/classes/class.ilRoleTableGUI.php';
132  $table = new ilRoleTableGUI($this, 'view');
133  $table->init();
134  $table->parse($this->object->getId());
135 
136  $this->tpl->setContent($table->getHTML());
137  }
138 
142  protected function roleSearchObject()
143  {
144  global $rbacsystem, $ilCtrl, $ilTabs;
145 
146  $ilTabs->clearTargets();
147  $ilTabs->setBackTarget(
148  $this->lng->txt('rbac_back_to_overview'),
149  $this->ctrl->getLinkTarget($this, 'view')
150  );
151 
152  if (!$rbacsystem->checkAccess('visible,read', $this->object->getRefId())) {
153  $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->MESSAGE);
154  }
155 
156  $ilCtrl->setParameter($this, 'copy_source', (int) $_REQUEST['copy_source']);
157  ilUtil::sendInfo($this->lng->txt('rbac_choose_copy_targets'));
158 
159  $form = $this->initRoleSearchForm();
160  $this->tpl->setContent($form->getHTML());
161  }
162 
166  protected function initRoleSearchForm()
167  {
168  global $ilCtrl;
169 
170  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
171  $form = new ilPropertyFormGUI();
172  $form->setTitle($this->lng->txt('rbac_role_title'));
173  $form->setFormAction($ilCtrl->getFormAction($this, 'view'));
174 
175  $search = new ilTextInputGUI($this->lng->txt('title'), 'title');
176  $search->setRequired(true);
177  $search->setSize(30);
178  $search->setMaxLength(255);
179  $form->addItem($search);
180 
181  $form->addCommandButton('roleSearchForm', $this->lng->txt('search'));
182  return $form;
183  }
184 
185 
191  protected function roleSearchFormObject()
192  {
193  global $ilCtrl;
194 
195  $_SESSION['rolf_search_query'] = '';
196  $ilCtrl->setParameter($this, 'copy_source', (int) $_REQUEST['copy_source']);
197 
198  $form = $this->initRoleSearchForm();
199  if ($form->checkInput()) {
200  $_SESSION['rolf_search_query'] = $form->getInput('title');
201  return $this->roleSearchListObject();
202  }
203 
204  ilUtil::sendFailure($this->lng->txt('msg_no_search_string'), true);
205  $form->setValuesByPost();
206  $ilCtrl->redirect($this, 'roleSearch');
207  }
208 
212  protected function roleSearchListObject()
213  {
214  global $ilTabs, $ilCtrl;
215 
216  $ilTabs->clearTargets();
217  $ilTabs->setBackTarget(
218  $this->lng->txt('rbac_back_to_overview'),
219  $this->ctrl->getLinkTarget($this, 'roleSearchList')
220  );
221 
222  $ilCtrl->setParameter($this, 'copy_source', (int) $_REQUEST['copy_source']);
223 
224  if (strlen($_SESSION['rolf_search_query'])) {
225  ilUtil::sendInfo($this->lng->txt('rbac_select_copy_targets'));
226 
227  include_once './Services/AccessControl/classes/class.ilRoleTableGUI.php';
228  $table = new ilRoleTableGUI($this, 'roleSearchList');
230  $table->setRoleTitleFilter($_SESSION['rolf_search_query']);
231  $table->init();
232  $table->parse($this->object->getId());
233  return $this->tpl->setContent($table->getHTML());
234  }
235 
236  ilUtil::sendFailure($this->lng->txt('msg_no_search_string'), true);
237  $ilCtrl->redirect($this, 'roleSearch');
238  }
239 
244  protected function chooseCopyBehaviourObject()
245  {
246  global $ilCtrl, $ilTabs;
247 
248  $ilCtrl->saveParameter($this, 'copy_source', (int) $_REQUEST['copy_source']);
249  $ilTabs->clearTargets();
250  $ilTabs->setBackTarget(
251  $this->lng->txt('rbac_back_to_overview'),
252  $this->ctrl->getLinkTarget($this, 'roleSearchList')
253  );
254  $form = $this->initCopyBehaviourForm();
255  $this->tpl->setContent($form->getHTML());
256  }
257 
261  protected function initCopyBehaviourForm()
262  {
263  global $ilCtrl;
264 
265  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
266  $form = new ilPropertyFormGUI();
267  $form->setTitle($this->lng->txt('rbac_copy_behaviour'));
268  $form->setFormAction($ilCtrl->getFormAction($this, 'chooseCopyBehaviour'));
269 
270  $ce = new ilRadioGroupInputGUI($this->lng->txt('change_existing_objects'), 'change_existing');
271  $ce->setRequired(true);
272  $ce->setValue(1);
273  $form->addItem($ce);
274 
275  $ceo = new ilRadioOption($this->lng->txt('change_existing_objects'), 1);
276  $ce->addOption($ceo);
277 
278  $cne = new ilRadioOption($this->lng->txt('rbac_not_change_existing_objects'), 0);
279  $ce->addOption($cne);
280 
281  $roles = new ilHiddenInputGUI('roles');
282  $roles->setValue(implode(',', (array) $_POST['roles']));
283  $form->addItem($roles);
284 
285 
286  // if source is role template show option add permission, remove permissions and copy permissions
287  if (ilObject::_lookupType((int) $_REQUEST['copy_source']) == 'rolt') {
288  $form->addCommandButton('addRolePermissions', $this->lng->txt('rbac_copy_role_add_perm'));
289  $form->addCommandButton('removeRolePermissions', $this->lng->txt('rbac_copy_role_remove_perm'));
290  $form->addCommandButton('copyRole', $this->lng->txt('rbac_copy_role_copy'));
291  } else {
292  $form->addCommandButton('copyRole', $this->lng->txt('rbac_copy_role'));
293  }
294  return $form;
295  }
296 
297 
301  protected function copyRoleObject()
302  {
303  global $ilCtrl;
304 
305  // Finally copy role/rolt
306  $roles = explode(',', $_POST['roles']);
307  $source = (int) $_REQUEST['copy_source'];
308 
309  $form = $this->initCopyBehaviourForm();
310  if ($form->checkInput()) {
311  foreach ((array) $roles as $role_id) {
312  if ($role_id != $source) {
313  $this->doCopyRole($source, $role_id, $form->getInput('change_existing'));
314  }
315  }
316 
317  ilUtil::sendSuccess($this->lng->txt('rbac_copy_finished'), true);
318  $ilCtrl->redirect($this, 'view');
319  }
320  }
321 
325  protected function addRolePermissionsObject()
326  {
327  global $ilCtrl;
328 
329  // Finally copy role/rolt
330  $roles = explode(',', $_POST['roles']);
331  $source = (int) $_REQUEST['copy_source'];
332 
333  $form = $this->initCopyBehaviourForm();
334  if ($form->checkInput()) {
335  foreach ((array) $roles as $role_id) {
336  if ($role_id != $source) {
337  $this->doAddRolePermissions($source, $role_id, $form->getInput('change_existing'));
338  }
339  }
340 
341  ilUtil::sendSuccess($this->lng->txt('rbac_copy_finished'), true);
342  $ilCtrl->redirect($this, 'view');
343  }
344  }
345 
349  protected function doAddRolePermissions($source, $target, $change_existing)
350  {
351  global $rbacadmin, $rbacreview;
352 
353  $rbacadmin->copyRolePermissionUnion(
354  $source,
355  $this->object->getRefId(),
356  $target,
357  $rbacreview->getRoleFolderOfRole($target),
358  $target,
359  $rbacreview->getRoleFolderOfRole($target)
360  );
361 
362  if ($change_existing) {
363  $target_obj = $rbacreview->getRoleFolderOfRole($target);
364  $this->doChangeExistingObjects($target_obj, $target);
365  }
366  }
367 
371  protected function removeRolePermissionsObject()
372  {
373  global $ilCtrl;
374 
375  // Finally copy role/rolt
376  $roles = explode(',', $_POST['roles']);
377  $source = (int) $_REQUEST['copy_source'];
378 
379  $form = $this->initCopyBehaviourForm();
380  if ($form->checkInput()) {
381  foreach ((array) $roles as $role_id) {
382  if ($role_id != $source) {
383  $this->doRemoveRolePermissions($source, $role_id, $form->getInput('change_existing'));
384  }
385  }
386 
387  ilUtil::sendSuccess($this->lng->txt('rbac_copy_finished'), true);
388  $ilCtrl->redirect($this, 'view');
389  }
390  }
391 
395  protected function doRemoveRolePermissions($source, $target, $change_existing)
396  {
397  global $rbacadmin, $rbacreview;
398 
399  ilLoggerFactory::getLogger('ac')->debug('Remove permission source: ' . $source);
400  ilLoggerFactory::getLogger('ac')->debug('Remove permission target: ' . $target);
401  ilLoggerFactory::getLogger('ac')->debug('Remove permission change existing: ' . $change_existing);
402 
403  $rbacadmin->copyRolePermissionSubtract(
404  $source,
405  $this->object->getRefId(),
406  $target,
407  $rbacreview->getRoleFolderOfRole($target)
408  );
409 
410  if ($change_existing) {
411  $target_obj = $rbacreview->getRoleFolderOfRole($target);
412  $this->doChangeExistingObjects($target_obj, $target);
413  }
414  }
415 
416 
417 
428  protected function doCopyRole($source, $target, $change_existing)
429  {
430  global $tree, $rbacadmin, $rbacreview;
431 
432  $target_obj = $rbacreview->getRoleFolderOfRole($target);
433 
434  // Copy role template permissions
435  $rbacadmin->copyRoleTemplatePermissions(
436  $source,
437  $this->object->getRefId(),
438  $target_obj,
439  $target
440  );
441 
442  if (!$change_existing || !$target_obj) {
443  return true;
444  }
445 
446  $start = $target_obj;
447 
448  include_once './Services/AccessControl/classes/class.ilObjRole.php';
449  if ($rbacreview->isProtected($this->object->getRefId(), $source)) {
451  } else {
453  }
454 
455  if ($start) {
456  $role = new ilObjRole($target);
457  $role->changeExistingObjects(
458  $start,
459  $mode,
460  array('all')
461  );
462  }
463  }
464 
471  protected function doChangeExistingObjects($a_start_obj, $a_target_role)
472  {
473  global $rbacreview;
474 
475  if (!$a_start_obj) {
476  // todo error handling
477  }
478 
479  include_once './Services/AccessControl/classes/class.ilObjRole.php';
480  if ($rbacreview->isProtected($this->object->getRefId(), $a_source_role)) {
482  } else {
484  }
485 
486  if ($a_start_obj) {
487  $role = new ilObjRole($a_target_role);
488  $role->changeExistingObjects(
489  $a_start_obj,
490  $mode,
491  array('all')
492  );
493  }
494  }
495 
496 
500  protected function applyFilterObject()
501  {
502  include_once './Services/AccessControl/classes/class.ilRoleTableGUI.php';
503  $table = new ilRoleTableGUI($this, 'view');
504  $table->init();
505  $table->resetOffset();
506  $table->writeFilterToSession();
507 
508  $this->viewObject();
509  }
510 
514  public function resetFilterObject()
515  {
516  include_once './Services/AccessControl/classes/class.ilRoleTableGUI.php';
517  $table = new ilRoleTableGUI($this, 'view');
518  $table->init();
519  $table->resetOffset();
520  $table->resetFilter();
521 
522  $this->viewObject();
523  }
524 
528  protected function confirmDeleteObject()
529  {
530  global $ilCtrl;
531 
532  if (!count($_POST['roles'])) {
533  ilUtil::sendFailure($this->lng->txt('select_one'), true);
534  $ilCtrl->redirect($this, 'view');
535  }
536 
537  $question = $this->lng->txt('rbac_role_delete_qst');
538 
539  include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
540  $confirm = new ilConfirmationGUI();
541  $confirm->setHeaderText($question);
542  $confirm->setFormAction($ilCtrl->getFormAction($this));
543  $confirm->setHeaderText($this->lng->txt("info_delete_sure"));
544  $confirm->setConfirm($this->lng->txt('delete'), 'deleteRole');
545  $confirm->setCancel($this->lng->txt('cancel'), 'cancel');
546 
547 
548  include_once './Services/AccessControl/classes/class.ilObjRole.php';
549  foreach ($_POST['roles'] as $role_id) {
550  $confirm->addItem(
551  'roles[]',
552  $role_id,
554  );
555  }
556  $this->tpl->setContent($confirm->getHTML());
557  }
558 
562  protected function deleteRoleObject()
563  {
565 
566  if (!$rbacsystem->checkAccess('delete', $this->object->getRefId())) {
567  $ilErr->raiseError(
568  $this->lng->txt('msg_no_perm_delete'),
569  $ilErr->MESSAGE
570  );
571  }
572 
573  foreach ((array) $_POST['roles'] as $id) {
574  // instatiate correct object class (role or rolt)
576 
577  if ($obj->getType() == "role") {
578  $rolf_arr = $rbacreview->getFoldersAssignedToRole($obj->getId(), true);
579  $obj->setParent($rolf_arr[0]);
580  }
581 
582  $obj->delete();
583  }
584 
585  // set correct return location if rolefolder is removed
586  ilUtil::sendSuccess($this->lng->txt("msg_deleted_roles_rolts"), true);
587  $ilCtrl->redirect($this, 'view');
588  }
589 
590 
591 
592 
593 
599  public function createObject()
600  {
601  $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
602 
603  /*
604  $this->object->setTitle($this->lng->txt("obj_".$this->object->getType()."_local"));
605  $this->object->setDescription("obj_".$this->object->getType()."_local_desc");
606 
607  $this->saveObject();
608  */
609  }
610 
616  public function deleteObject($a_error = false)
617  {
618  $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
619  }
620 
626  public function adoptPermSaveObject()
627  {
628  ilUtil::sendSuccess($this->lng->txt("saved_successfully"), true);
629 
630  $this->ctrl->redirect($this, "view");
631  }
632 
639  public function showPossibleSubObjects()
640  {
641  global $rbacsystem;
642 
643  $d = $this->objDefinition->getCreatableSubObjects($this->object->getType());
644 
645  if ($this->object->getRefId() != ROLE_FOLDER_ID or !$rbacsystem->checkAccess('create_rolt', ROLE_FOLDER_ID)) {
646  unset($d["rolt"]);
647  }
648 
649  if (!$rbacsystem->checkAccess('create_role', $this->object->getRefId())) {
650  unset($d["role"]);
651  }
652 
653  if (count($d) > 0) {
654  foreach ($d as $row) {
655  $count = 0;
656  if ($row["max"] > 0) {
657  //how many elements are present?
658  for ($i=0; $i<count($this->data["ctrl"]); $i++) {
659  if ($this->data["ctrl"][$i]["type"] == $row["name"]) {
660  $count++;
661  }
662  }
663  }
664  if ($row["max"] == "" || $count < $row["max"]) {
665  $subobj[] = $row["name"];
666  }
667  }
668  }
669 
670  if (is_array($subobj)) {
671  //build form
672  $opts = ilUtil::formSelect(12, "new_type", $subobj);
673  $this->tpl->setCurrentBlock("add_object");
674  $this->tpl->setVariable("SELECT_OBJTYPE", $opts);
675  $this->tpl->setVariable("BTN_NAME", "create");
676  $this->tpl->setVariable("TXT_ADD", $this->lng->txt("add"));
677  $this->tpl->parseCurrentBlock();
678  }
679  }
680 
685  public function saveObject()
686  {
687  global $rbacadmin;
688 
689  // role folders are created automatically
690  $_GET["new_type"] = $this->object->getType();
691  $_POST["Fobject"]["title"] = $this->object->getTitle();
692  $_POST["Fobject"]["desc"] = $this->object->getDescription();
693 
694  // always call parent method first to create an object_data entry & a reference
695  $newObj = parent::saveObject();
696 
697  // put here your object specific stuff
698 
699  // always send a message
700  ilUtil::sendSuccess($this->lng->txt("rolf_added"), true);
701 
702  $this->ctrl->redirect($this, "view");
703  }
704 
711  public function getAdminTabs()
712  {
713  if ($this->checkPermissionBool("visible,read")) {
714  $this->tabs_gui->addTarget(
715  "view",
716  $this->ctrl->getLinkTarget($this, "view"),
717  array("", "view"),
718  get_class($this)
719  );
720 
721  $this->tabs_gui->addTarget(
722  "settings",
723  $this->ctrl->getLinkTarget($this, "editSettings"),
724  array("editSettings"),
725  get_class($this)
726  );
727  }
728 
729  if ($this->checkPermissionBool("edit_permission")) {
730  $this->tabs_gui->addTarget(
731  "perm_settings",
732  $this->ctrl->getLinkTargetByClass(
733  array(get_class($this),'ilpermissiongui'),
734  "perm"
735  ),
736  "",
737  "ilpermissiongui"
738  );
739  }
740  }
741 
742  public function editSettingsObject(ilPropertyFormGUI $a_form = null)
743  {
744  if (!$a_form) {
745  $a_form = $this->initSettingsForm();
746  }
747 
748  $this->tpl->setContent($a_form->getHTML());
749  }
750 
751  public function saveSettingsObject()
752  {
753  global $ilErr, $rbacreview, $ilUser;
754 
755  if (!$this->checkPermissionBool("write")) {
756  $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->MESSAGE);
757  }
758 
759  $form = $this->initSettingsForm();
760  if ($form->checkInput()) {
761  include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
762  $privacy = ilPrivacySettings::_getInstance();
763  $privacy->enableRbacLog((int) $_POST['rbac_log']);
764  $privacy->setRbacLogAge((int) $_POST['rbac_log_age']);
765  $privacy->save();
766 
767  if ($rbacreview->isAssigned($ilUser->getId(), SYSTEM_ROLE_ID)) {
768  include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
769  $security = ilSecuritySettings::_getInstance();
770  $security->protectedAdminRole((int) $_POST['admin_role']);
771  $security->save();
772  }
773 
774  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
775  $this->ctrl->redirect($this, "editSettings");
776  }
777 
778  $form->setValuesByPost();
779  $this->editSettingsObject($form);
780  }
781 
782  protected function initSettingsForm()
783  {
784  global $rbacreview, $ilUser;
785 
786  $this->lng->loadLanguageModule('ps');
787 
788  include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
789  include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
790  $privacy = ilPrivacySettings::_getInstance();
791  $security = ilSecuritySettings::_getInstance();
792 
793  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
794  $form = new ilPropertyFormGUI();
795  $form->setFormAction($this->ctrl->getFormAction($this, "saveSettings"));
796  $form->setTitle($this->lng->txt('settings'));
797 
798  // protected admin
799  $admin = new ilCheckboxInputGUI($GLOBALS['lng']->txt('adm_adm_role_protect'), 'admin_role');
800  $admin->setDisabled(!$rbacreview->isAssigned($ilUser->getId(), SYSTEM_ROLE_ID));
801  $admin->setInfo($this->lng->txt('adm_adm_role_protect_info'));
802  $admin->setChecked((int) $security->isAdminRoleProtected());
803  $admin->setValue(1);
804  $form->addItem($admin);
805 
806  $check = new ilCheckboxInputGui($this->lng->txt('rbac_log'), 'rbac_log');
807  $check->setInfo($this->lng->txt('rbac_log_info'));
808  $check->setChecked($privacy->enabledRbacLog());
809  $form->addItem($check);
810 
811  $age = new ilNumberInputGUI($this->lng->txt('rbac_log_age'), 'rbac_log_age');
812  $age->setInfo($this->lng->txt('rbac_log_age_info'));
813  $age->setValue($privacy->getRbacLogAge());
814  $age->setMinValue(1);
815  $age->setMaxValue(24);
816  $age->setSize(2);
817  $age->setMaxLength(2);
818  $check->addSubItem($age);
819 
820  $form->addCommandButton('saveSettings', $this->lng->txt('save'));
821 
822  return $form;
823  }
824 
825  public function addToExternalSettingsForm($a_form_id)
826  {
827  switch ($a_form_id) {
829 
830  include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
831  $security = ilSecuritySettings::_getInstance();
832 
833  $fields = array('adm_adm_role_protect' => array($security->isAdminRoleProtected(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
834 
835  return array(array("editSettings", $fields));
836 
838 
839  include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
840  $privacy = ilPrivacySettings::_getInstance();
841 
842  $subitems = null;
843  if ((bool) $privacy->enabledRbacLog()) {
844  $subitems = array('rbac_log_age' => $privacy->getRbacLogAge());
845  }
846  $fields = array('rbac_log' => array($privacy->enabledRbacLog(), ilAdministrationSettingsFormHandler::VALUE_BOOL, $subitems));
847 
848  return array(array("editSettings", $fields));
849  }
850  }
851 } // END class.ilObjRoleFolderGUI
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Class ilObjRole.
Add some data
This class represents an option in a radio group.
editSettingsObject(ilPropertyFormGUI $a_form=null)
adoptPermSaveObject()
??? TODO: what is the purpose of this function? public
$_SESSION["AccountId"]
This class represents a property form user interface.
confirmDeleteObject()
Confirm deletion of roles.
$_GET["client_id"]
const MODE_PROTECTED_DELETE_LOCAL_POLICIES
getAdminTabs()
Add role folder tabs ilTree $tree ilLanguage $lng.
showPossibleSubObjects()
show possible subobjects (pulldown menu) overwritten to prevent displaying of role templates in local...
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
deleteObject($a_error=false)
display deletion confirmation screen DEPRECATED !!! public
if(!array_key_exists('StateId', $_REQUEST)) $id
This class represents a checkbox property in a property form.
static _lookupTitle($a_id)
lookup object title
Class ilObjRoleFolderGUI.
TableGUI for the presentation og roles and role templates.
global $ilCtrl
Definition: ilias.php:18
setInfo($a_info)
Set Information Text.
__construct($a_data, $a_id, $a_call_by_reference)
Constructor public.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
This class represents a hidden form property in a property form.
prepareOutput($a_show_subobjects=true)
prepare output
This class represents a property in a property form.
if(isset($_POST['submit'])) $form
This class represents a number property in a property form.
Class ilObjectGUI Basic methods of all Output classes.
doCopyRole($source, $target, $change_existing)
Perform copy of role ilTree $tree <type> $rbacadmin <type> $rbacreview.
initRoleSearchForm()
Init role search form.
This class represents a text property in a property form.
removeRolePermissionsObject()
Remove role permissions.
doChangeExistingObjects($a_start_obj, $a_target_role)
Do change existing objects type $rbacreview.
$ilUser
Definition: imgupload.php:18
redirection script todo: (a better solution should control the processing via a xml file) ...
applyFilterObject()
Apply role filter.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static _getTranslation($a_role_title)
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
resetFilterObject()
Reset role filter.
viewObject()
ilErrorHandler $ilErr ilRbacSystem $rbacsystem ilToolbarGUI $ilToolbar
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
const MODE_UNPROTECTED_DELETE_LOCAL_POLICIES
Create new PHPExcel object
obj_idprivate
createObject()
role folders are created automatically DEPRECATED !!! public
$ret
Definition: parser.php:6
$i
Definition: disco.tpl.php:19
saveObject()
save object public
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static getLogger($a_component_id)
Get component logger.
static _getInstance()
Get instance of ilPrivacySettings.
$source
Definition: linkback.php:22
if(empty($password)) $table
Definition: pwgen.php:24
chooseCopyBehaviourObject()
Chosse change existing objects,...
roleSearchFormObject()
Parse search query type $ilCtrl.
static _getInstance()
Get instance of ilSecuritySettings.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
$_POST["username"]
setRequired($a_required)
Set Required.
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
Definition: date.php:296
initCopyBehaviourForm()
Show copy behaviour form.
Confirmation screen class.
addRolePermissionsObject()
Add role permissions.
doRemoveRolePermissions($source, $target, $change_existing)
do add role permission
doAddRolePermissions($source, $target, $change_existing)
do add role permission
roleSearchObject()
Search target roles.