ILIAS  release_8 Revision v8.24
class.ilObjRoleFolderGUI.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
23
32{
33 private const COPY_ADD_PERMISSIONS = 1;
34 private const COPY_CLONE_PERMISSIONS = 2;
35 private const COPY_REMOVE_PERMISSIONS = 3;
37
40
42 protected Factory $refinery;
43
48 public function __construct($a_data, int $a_id, bool $a_call_by_reference)
49 {
50 global $DIC;
51
52 $this->logger = $DIC->logger()->ac();
53 $this->rbacadmin = $DIC->rbac()->admin();
54 $this->http = $DIC->http();
55 $this->refinery = $DIC->refinery();
56 $this->type = "rolf";
57 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
58 $this->lng->loadLanguageModule('rbac');
59 }
60
61 public function executeCommand(): void
62 {
63 $next_class = $this->ctrl->getNextClass($this);
64 $cmd = $this->ctrl->getCmd();
65 $this->prepareOutput();
66
67 switch ($next_class) {
68
69 case 'ilpermissiongui':
70 $perm_gui = new ilPermissionGUI($this);
71 $ret = $this->ctrl->forwardCommand($perm_gui);
72 break;
73
74 default:
75 $this->ctrl->setReturn($this, "view");
76 if (!$cmd) {
77 $cmd = "view";
78 }
79 $cmd .= "Object";
80 $this->$cmd();
81
82 break;
83 }
84 }
85
86 protected function initCopySourceFromGET(): int
87 {
88 if ($this->http->wrapper()->query()->has('csource')) {
89 return $this->http->wrapper()->query()->retrieve(
90 'csource',
91 $this->refinery->kindlyTo()->int()
92 );
93 }
94 return 0;
95 }
96
100 protected function initRolesFromPOST(): array
101 {
102 if ($this->http->wrapper()->post()->has('roles')) {
103 return $this->http->wrapper()->post()->retrieve(
104 'roles',
105 $this->refinery->byTrying([
106 $this->refinery->kindlyTo()->listOf(
107 $this->refinery->kindlyTo()->int()
108 ),
109 $this->refinery->in()->series([
110 $this->refinery->custom()->transformation(function ($v) {
111 return explode(',', $v);
112 }),
113 $this->refinery->kindlyTo()->listOf(
114 $this->refinery->kindlyTo()->int()
115 )
116 ])
117 ])
118 );
119 }
120 return [];
121 }
122
123 public function viewObject(): void
124 {
125 $this->tabs_gui->activateTab('view');
126
127 if (!$this->rbac_system->checkAccess('visible,read', $this->object->getRefId())) {
128 $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
129 }
130
131 if ($this->rbac_system->checkAccess('create_role', $this->object->getRefId())) {
132 $this->ctrl->setParameter($this, 'new_type', 'role');
133 $this->toolbar->addButton(
134 $this->lng->txt('rolf_create_role'),
135 $this->ctrl->getLinkTarget($this, 'create')
136 );
137 }
138 if ($this->rbac_system->checkAccess('create_rolt', $this->object->getRefId())) {
139 $this->ctrl->setParameter($this, 'new_type', 'rolt');
140 $this->toolbar->addButton(
141 $this->lng->txt('rolf_create_rolt'),
142 $this->ctrl->getLinkTarget($this, 'create')
143 );
144 $this->ctrl->clearParameters($this);
145 }
146
147 if (
148 $this->rbac_system->checkAccess('create_rolt', $this->object->getRefId()) ||
149 $this->rbac_system->checkAccess('create_rolt', $this->object->getRefId())
150 ) {
151 $this->toolbar->addButton(
152 $this->lng->txt('rbac_import_role'),
153 $this->ctrl->getLinkTargetByClass('ilPermissionGUI', 'displayImportRoleForm')
154 );
155 }
156
157 $table = new ilRoleTableGUI($this, 'view');
158 $table->init();
159 $table->parse($this->object->getId());
160
161 $this->tpl->setContent($table->getHTML());
162 }
163
167 protected function roleSearchObject(): void
168 {
169 $this->tabs_gui->clearTargets();
170 $this->tabs_gui->setBackTarget(
171 $this->lng->txt('rbac_back_to_overview'),
172 $this->ctrl->getLinkTarget($this, 'view')
173 );
174
175 if (!$this->rbac_system->checkAccess('visible,read', $this->object->getRefId())) {
176 $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
177 }
178
179 $this->ctrl->setParameter($this, 'csource', $this->initCopySourceFromGET());
180 $this->tpl->setOnScreenMessage('info', $this->lng->txt('rbac_choose_copy_targets'));
181
182 $form = $this->initRoleSearchForm();
183 $this->tpl->setContent($form->getHTML());
184 }
185
190 {
191 $form = new ilPropertyFormGUI();
192 $form->setTitle($this->lng->txt('rbac_role_title'));
193 $form->setFormAction($this->ctrl->getFormAction($this, 'view'));
194
195 $search = new ilTextInputGUI($this->lng->txt('title'), 'title');
196 $search->setRequired(true);
197 $search->setSize(30);
198 $search->setMaxLength(255);
199 $form->addItem($search);
200
201 $form->addCommandButton('roleSearchForm', $this->lng->txt('search'));
202 return $form;
203 }
204
208 protected function roleSearchFormObject(): void
209 {
210 ilSession::set('rolf_search_query', '');
211 $this->ctrl->setParameter($this, 'csource', $this->initCopySourceFromGET());
212
213 $form = $this->initRoleSearchForm();
214 if ($form->checkInput()) {
215 ilSession::set('rolf_search_query', $form->getInput('title'));
216 $this->roleSearchListObject();
217 return;
218 }
219
220 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('msg_no_search_string'), true);
221 $form->setValuesByPost();
222 $this->ctrl->redirect($this, 'roleSearch');
223 }
224
228 protected function roleSearchListObject(): void
229 {
230 $this->tabs_gui->clearTargets();
231 $this->tabs_gui->setBackTarget(
232 $this->lng->txt('rbac_back_to_overview'),
233 $this->ctrl->getLinkTarget($this, 'view')
234 );
235
236 $this->ctrl->setParameter($this, 'csource', $this->initCopySourceFromGET());
237
238 if (strlen(ilSession::get('rolf_search_query'))) {
239 $this->tpl->setOnScreenMessage('info', $this->lng->txt('rbac_select_copy_targets'));
240 $table = new ilRoleTableGUI($this, 'roleSearchList');
241 $table->setType(ilRoleTableGUI::TYPE_SEARCH);
242 $table->setRoleTitleFilter(ilSession::get('rolf_search_query'));
243 $table->init();
244 $table->parse($this->object->getId());
245 $this->tpl->setContent($table->getHTML());
246 return;
247 }
248
249 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('msg_no_search_string'), true);
250 $this->ctrl->redirect($this, 'roleSearch');
251 }
252
256 protected function chooseCopyBehaviourObject(?ilPropertyFormGUI $form = null): void
257 {
258 $this->initCopySourceFromGET();
259
260 $this->ctrl->saveParameter($this, 'csource');
261 $this->tabs_gui->clearTargets();
262 $this->tabs_gui->setBackTarget(
263 $this->lng->txt('rbac_back_to_overview'),
264 $this->ctrl->getLinkTarget($this, 'view')
265 );
266 if (!$form instanceof \ilPropertyFormGUI) {
267 $form = $this->initCopyBehaviourForm();
268 }
269 $this->tpl->setContent($form->getHTML());
270 }
271
276 {
277 // not only for role templates; add/remove permissions is also applicable for roles
278 $full_featured = true;
279
280 $form = new ilPropertyFormGUI();
281 $form->setTitle($this->lng->txt('rbac_copy_behaviour'));
282 $form->setFormAction($this->ctrl->getFormAction($this, 'chooseCopyBehaviour'));
283
284 $copy_type = new \ilRadioGroupInputGUI(
285 $this->lng->txt('rbac_form_copy_roles_adjust_type'),
286 'type'
287 );
288 $copy_type->setRequired(true);
289 $copy_type->setValue((string) self::COPY_CLONE_PERMISSIONS);
290
291 if ($full_featured) {
292 $add = new \ilRadioOption(
293 $this->lng->txt('rbac_form_copy_roles_adjust_type_add'),
294 (string) self::COPY_ADD_PERMISSIONS,
295 $this->lng->txt('rbac_form_copy_roles_adjust_type_add_info')
296 );
297 $copy_type->addOption($add);
298
299 $ce_type_add = new \ilRadioGroupInputGUI(
300 '',
301 'add_ce_type'
302 );
303 $ce_type_add->setRequired(true);
304 $ce_add_yes = new \ilRadioOption(
305 $this->lng->txt('rbac_form_copy_roles_ce_add_yes'),
306 (string) self::COPY_CHANGE_EXISTING_OBJECTS,
307 $this->lng->txt('rbac_form_copy_roles_ce_add_yes_info')
308 );
309 $ce_type_add->addOption($ce_add_yes);
310 $ce_add_no = new \ilRadioOption(
311 $this->lng->txt('rbac_form_copy_roles_ce_add_no'),
312 (string) 0,
313 $this->lng->txt('rbac_form_copy_roles_ce_add_no_info')
314 );
315 $ce_type_add->addOption($ce_add_no);
316 $add->addSubItem($ce_type_add);
317 }
318 $clone = new \ilRadioOption(
319 $this->lng->txt('rbac_form_copy_roles_adjust_type_clone'),
320 (string) self::COPY_CLONE_PERMISSIONS,
321 $this->lng->txt('rbac_form_copy_roles_adjust_type_clone_info')
322 );
323 $copy_type->addOption($clone);
324
325 $ce_type_clone = new \ilRadioGroupInputGUI(
326 '',
327 'clone_ce_type'
328 );
329 $ce_type_clone->setRequired(true);
330 $ce_clone_yes = new \ilRadioOption(
331 $this->lng->txt('rbac_form_copy_roles_ce_clone_yes'),
332 (string) self::COPY_CHANGE_EXISTING_OBJECTS,
333 $this->lng->txt('rbac_form_copy_roles_ce_clone_yes_info')
334 );
335 $ce_type_clone->addOption($ce_clone_yes);
336 $ce_clone_no = new \ilRadioOption(
337 $this->lng->txt('rbac_form_copy_roles_ce_clone_no'),
338 (string) 0,
339 $this->lng->txt('rbac_form_copy_roles_ce_clone_no_info')
340 );
341 $ce_type_clone->addOption($ce_clone_no);
342 $clone->addSubItem($ce_type_clone);
343
344 if ($full_featured) {
345 $remove = new \ilRadioOption(
346 $this->lng->txt('rbac_form_copy_roles_adjust_type_remove'),
347 (string) self::COPY_REMOVE_PERMISSIONS,
348 $this->lng->txt('rbac_form_copy_roles_adjust_type_remove_info')
349 );
350 $copy_type->addOption($remove);
351 $ce_type_remove = new \ilRadioGroupInputGUI(
352 '',
353 'remove_ce_type'
354 );
355 $ce_type_remove->setRequired(true);
356 $ce_remove_yes = new \ilRadioOption(
357 $this->lng->txt('rbac_form_copy_roles_ce_remove_yes'),
358 (string) self::COPY_CHANGE_EXISTING_OBJECTS,
359 $this->lng->txt('rbac_form_copy_roles_ce_remove_yes_info')
360 );
361 $ce_type_remove->addOption($ce_remove_yes);
362 $ce_remove_no = new \ilRadioOption(
363 $this->lng->txt('rbac_form_copy_roles_ce_remove_no'),
364 (string) 0,
365 $this->lng->txt('rbac_form_copy_roles_ce_remove_no_info')
366 );
367 $ce_type_remove->addOption($ce_remove_no);
368 $remove->addSubItem($ce_type_remove);
369 }
370
371 $form->addItem($copy_type);
372
373 $roles = new ilHiddenInputGUI('roles');
374 $roles->setValue(implode(',', $this->initRolesFromPOST()));
375 $form->addItem($roles);
376
377 $form->addCommandButton('roleSearchList', $this->lng->txt('back'));
378 $form->addCommandButton('adjustRole', $this->lng->txt('rbac_form_copy_roles_adjust_button'));
379 return $form;
380 }
381
385 protected function adjustRoleObject(): void
386 {
387 $this->checkPermission('write');
388
389 $roles = $this->initRolesFromPOST();
391
392 $form = $this->initCopyBehaviourForm();
393 if ($form->checkInput()) {
394 $adjustment_type = $form->getInput('type');
395 foreach ((array) $roles as $role_id) {
396 if ($role_id !== $source) {
397 $start_obj = $this->rbac_review->getRoleFolderOfRole($role_id);
398 $this->logger->debug('Start object: ' . $start_obj);
399
400 switch ($adjustment_type) {
402 $change_existing = (bool) $form->getInput('add_ce_type');
404 $source,
405 $role_id
406 );
407 if ($change_existing) {
409 $start_obj,
410 $role_id,
412 $source
413 );
414 }
415 break;
417 $change_existing = (bool) $form->getInput('clone_ce_type');
418 $this->doCopyRole(
419 $source,
420 $role_id
421 );
422 if ($change_existing) {
424 $start_obj,
425 $role_id,
427 $source
428 );
429 }
430 break;
432 $change_existing = (bool) $form->getInput('remove_ce_type');
434 $source,
435 $role_id
436 );
437 if ($change_existing) {
439 $start_obj,
440 $role_id,
442 $source
443 );
444 }
445 break;
446 }
447 }
448 }
449 $this->tpl->setOnScreenMessage('success', $this->lng->txt('rbac_copy_finished'), true);
450 $this->ctrl->redirect($this, 'view');
451 }
452 }
453
457 protected function doAddRolePermissions(int $source, int $target): void
458 {
459 $source_definition = $this->rbac_review->getRoleFolderOfRole($source);
460 $this->rbacadmin->copyRolePermissionUnion(
461 $source,
462 $source_definition,
463 $target,
464 $this->rbac_review->getRoleFolderOfRole($target),
465 $target,
466 $this->rbac_review->getRoleFolderOfRole($target)
467 );
468 }
469
473 protected function removeRolePermissionsObject(): void
474 {
475 // Finally copy role/rolt
476 $roles = $this->initRolesFromPOST();
478
479 $form = $this->initCopyBehaviourForm();
480 if ($form->checkInput()) {
481 foreach ((array) $roles as $role_id) {
482 if ($role_id !== $source) {
483 $this->doRemoveRolePermissions($source, $role_id);
484 }
485 }
486 $this->tpl->setOnScreenMessage('success', $this->lng->txt('rbac_copy_finished'), true);
487 $this->ctrl->redirect($this, 'view');
488 }
489 }
490
494 protected function doRemoveRolePermissions(int $source, int $target): void
495 {
496 $this->logger->debug('Remove permission source: ' . $source);
497 $this->logger->debug('Remove permission target: ' . $target);
498 $source_obj = $this->rbac_review->getRoleFolderOfRole($source);
499 $this->rbacadmin->copyRolePermissionSubtract(
500 $source,
501 $source_obj,
502 $target,
503 $this->rbac_review->getRoleFolderOfRole($target)
504 );
505 }
506
510 protected function doCopyRole(int $source, int $target): void
511 {
512 $target_obj = $this->rbac_review->getRoleFolderOfRole($target);
513 $source_obj = $this->rbac_review->getRoleFolderOfRole($source);
514 // Copy role template permissions
515 $this->rbacadmin->copyRoleTemplatePermissions(
516 $source,
517 $source_obj,
518 $target_obj,
519 $target
520 );
521 }
522
526 protected function doChangeExistingObjects(
527 int $a_start_obj,
528 int $a_target_role,
529 int $a_operation_mode,
530 int $a_source_role
531 ): void {
532 if (!$a_start_obj) {
533 $this->logger->warning('Missing parameter start object.');
534 $this->logger->logStack(\ilLogLevel::WARNING);
535 throw new InvalidArgumentException('Missing parameter: start object');
536 }
537 // the mode is unchanged and read out from the target object
538 $target_ref_id = $this->rbac_review->getRoleFolderOfRole($a_target_role);
539 if ($this->rbac_review->isProtected($target_ref_id, $a_target_role)) {
541 } else {
543 }
544 $operation_stack = [];
545 if ($a_operation_mode !== \ilObjRole::MODE_READ_OPERATIONS) {
546 $operation_stack[] = $this->rbac_review->getAllOperationsOfRole($a_source_role, $this->ref_id);
547 }
548 $this->logger->debug('Current operation stack');
549 $this->logger->dump($operation_stack, ilLogLevel::DEBUG);
550
551 $role = new ilObjRole($a_target_role);
552 $role->changeExistingObjects(
553 $a_start_obj,
554 $mode,
555 array('all'),
556 [],
557 $a_operation_mode,
558 $operation_stack
559 );
560 }
561
565 protected function applyFilterObject(): void
566 {
567 $table = new ilRoleTableGUI($this, 'view');
568 $table->init();
569 $table->resetOffset();
570 $table->writeFilterToSession();
571
572 $this->viewObject();
573 }
574
578 public function resetFilterObject(): void
579 {
580 $table = new ilRoleTableGUI($this, 'view');
581 $table->init();
582 $table->resetOffset();
583 $table->resetFilter();
584
585 $this->viewObject();
586 }
587
591 protected function confirmDeleteObject(): void
592 {
593 $roles = $this->initRolesFromPOST();
594 if ($roles === []) {
595 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('select_one'), true);
596 $this->ctrl->redirect($this, 'view');
597 }
598
599 $question = $this->lng->txt('rbac_role_delete_qst');
600
601 $confirm = new ilConfirmationGUI();
602 $confirm->setHeaderText($question);
603 $confirm->setFormAction($this->ctrl->getFormAction($this));
604 $confirm->setHeaderText($this->lng->txt("info_delete_sure"));
605 $confirm->setConfirm($this->lng->txt('delete'), 'deleteRole');
606 $confirm->setCancel($this->lng->txt('cancel'), 'cancel');
607
608 foreach ($roles as $role_id) {
609 $confirm->addItem(
610 'roles[]',
611 (string) $role_id,
613 );
614 }
615 $this->tpl->setContent($confirm->getHTML());
616 }
617
621 protected function deleteRoleObject(): void
622 {
623 if (!$this->rbac_system->checkAccess('delete', $this->object->getRefId())) {
624 $this->error->raiseError(
625 $this->lng->txt('msg_no_perm_delete'),
626 $this->error->MESSAGE
627 );
628 }
629
630 foreach ($this->initRolesFromPOST() as $id) {
631 // instatiate correct object class (role or rolt)
633
634 if ($obj->getType() == "role") {
635 $rolf_arr = $this->rbac_review->getFoldersAssignedToRole($obj->getId(), true);
636 $obj->setParent($rolf_arr[0]);
637 }
638
639 $obj->delete();
640 }
641
642 // set correct return location if rolefolder is removed
643 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_deleted_roles_rolts"), true);
644 $this->ctrl->redirect($this, 'view');
645 }
646
653 public function getAdminTabs(): void
654 {
655 if ($this->checkPermissionBool("visible,read")) {
656 $this->tabs_gui->addTarget(
657 "view",
658 $this->ctrl->getLinkTarget($this, "view"),
659 array("", "view"),
660 get_class($this)
661 );
662
663 $this->tabs_gui->addTarget(
664 "settings",
665 $this->ctrl->getLinkTarget($this, "editSettings"),
666 array("editSettings"),
667 get_class($this)
668 );
669 }
670
671 if ($this->checkPermissionBool("edit_permission")) {
672 $this->tabs_gui->addTarget(
673 "perm_settings",
674 $this->ctrl->getLinkTargetByClass(
675 array(get_class($this), 'ilpermissiongui'),
676 "perm"
677 ),
678 "",
679 "ilpermissiongui"
680 );
681 }
682 }
683
684 public function editSettingsObject(ilPropertyFormGUI $a_form = null): void
685 {
686 if ($a_form === null) {
687 $a_form = $this->initSettingsForm();
688 }
689
690 $this->tpl->setContent($a_form->getHTML());
691 }
692
693 public function saveSettingsObject(): void
694 {
695 global $DIC;
696
697 $user = $DIC->user();
698
699 if (!$this->checkPermissionBool("write")) {
700 $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
701 }
702
703 $form = $this->initSettingsForm();
704 if ($form->checkInput()) {
706 $privacy->enableRbacLog((bool) $form->getInput('rbac_log'));
707 $privacy->setRbacLogAge((int) $form->getInput('rbac_log_age'));
708 $privacy->save();
709
710 if ($this->rbac_review->isAssigned($user->getId(), SYSTEM_ROLE_ID)) {
712 $security->protectedAdminRole((bool) $form->getInput('admin_role'));
713 $security->save();
714 }
715 $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
716 $this->ctrl->redirect($this, "editSettings");
717 }
718
719 $form->setValuesByPost();
720 $this->editSettingsObject($form);
721 }
722
724 {
725 global $DIC;
726
727 $user = $DIC->user();
728
729 $this->lng->loadLanguageModule('ps');
730
733
734 $form = new ilPropertyFormGUI();
735 $form->setFormAction($this->ctrl->getFormAction($this, "saveSettings"));
736 $form->setTitle($this->lng->txt('settings'));
737
738 // protected admin
739 $admin = new ilCheckboxInputGUI($GLOBALS['DIC']['lng']->txt('adm_adm_role_protect'), 'admin_role');
740 $admin->setDisabled(!$this->rbac_review->isAssigned($user->getId(), SYSTEM_ROLE_ID));
741 $admin->setInfo($this->lng->txt('adm_adm_role_protect_info'));
742 $admin->setChecked($security->isAdminRoleProtected());
743 $admin->setValue((string) 1);
744 $form->addItem($admin);
745
746 $check = new ilCheckboxInputGui($this->lng->txt('rbac_log'), 'rbac_log');
747 $check->setInfo($this->lng->txt('rbac_log_info'));
748 $check->setChecked($privacy->enabledRbacLog());
749 $form->addItem($check);
750
751 $age = new ilNumberInputGUI($this->lng->txt('rbac_log_age'), 'rbac_log_age');
752 $age->setInfo($this->lng->txt('rbac_log_age_info'));
753 $age->setValue((string) $privacy->getRbacLogAge());
754 $age->setMinValue(1);
755 $age->setMaxValue(24);
756 $age->setSize(2);
757 $age->setMaxLength(2);
758 $check->addSubItem($age);
759
760 $form->addCommandButton('saveSettings', $this->lng->txt('save'));
761
762 return $form;
763 }
764
765 public function addToExternalSettingsForm(int $a_form_id): array
766 {
767 switch ($a_form_id) {
769
771
772 $fields = array('adm_adm_role_protect' => array($security->isAdminRoleProtected(),
774 )
775 );
776
777 return array(array("editSettings", $fields));
778
780
782
783 $subitems = null;
784 if ($privacy->enabledRbacLog()) {
785 $subitems = array('rbac_log_age' => $privacy->getRbacLogAge());
786 }
787 $fields = array('rbac_log' => array($privacy->enabledRbacLog(),
789 $subitems
790 )
791 );
792
793 return array(array("editSettings", $fields));
794 }
795 return [];
796 }
797} // END class.ilObjRoleFolderGUI
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
static return function(ContainerConfigurator $containerConfigurator)
Definition: basic_rector.php:9
$check
Definition: buildRTE.php:81
Builds data types.
Definition: Factory.php:21
error(string $a_errmsg)
This class represents a checkbox property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Component logger with individual log levels by component id.
This class represents a number property in a property form.
Class ilObjRoleFolderGUI.
initCopyBehaviourForm()
Show copy behaviour form.
doAddRolePermissions(int $source, int $target)
do add role permission
__construct($a_data, int $a_id, bool $a_call_by_reference)
Constructor @access public.
addToExternalSettingsForm(int $a_form_id)
initRoleSearchForm()
Init role search form.
doCopyRole(int $source, int $target)
Perform copy of role.
doRemoveRolePermissions(int $source, int $target)
do add role permission
chooseCopyBehaviourObject(?ilPropertyFormGUI $form=null)
Choose option for copying roles/role templates.
roleSearchFormObject()
Parse search query.
resetFilterObject()
Reset role filter.
editSettingsObject(ilPropertyFormGUI $a_form=null)
roleSearchObject()
Search target roles.
doChangeExistingObjects(int $a_start_obj, int $a_target_role, int $a_operation_mode, int $a_source_role)
Do change existing objects.
getAdminTabs()
Add role folder tabs.
confirmDeleteObject()
Confirm deletion of roles.
removeRolePermissionsObject()
Remove role permissions.
viewObject()
viewObject container presentation for "administration -> repository, trash, permissions"
applyFilterObject()
Apply role filter.
Class ilObjRole.
const MODE_UNPROTECTED_KEEP_LOCAL_POLICIES
const MODE_REMOVE_OPERATIONS
const MODE_PROTECTED_KEEP_LOCAL_POLICIES
const MODE_ADD_OPERATIONS
const MODE_READ_OPERATIONS
static _getTranslation(string $a_role_title)
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
Class ilObjectGUI Basic methods of all Output classes.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
prepareOutput(bool $show_sub_objects=true)
static _lookupTitle(int $obj_id)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents a property form user interface.
Class ilRbacAdmin Core functions for role based access control.
TableGUI for the presentation og roles and role templates.
static _getInstance()
Get instance of ilSecuritySettings.
static get(string $a_var)
static set(string $a_var, $a_val)
Set a value.
This class represents a text property in a property form.
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: confirmReg.php:20
const SYSTEM_ROLE_ID
Definition: constants.php:29
global $DIC
Definition: feed.php:28
Interface GlobalHttpState.
$source
Definition: metadata.php:93
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc