ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilObjRoleFolderGUI Class Reference

Class ilObjRoleFolderGUI. More...

+ Inheritance diagram for ilObjRoleFolderGUI:
+ Collaboration diagram for ilObjRoleFolderGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference)
 Constructor @access public. More...
 
 executeCommand ()
 execute command More...
 
 viewObject ()
 @global ilErrorHandler $ilErr @global ilRbacSystem $rbacsystem @global ilToolbarGUI $ilToolbar More...
 
 resetFilterObject ()
 Reset role filter. More...
 
 createObject ()
 role folders are created automatically DEPRECATED !!! @access public More...
 
 deleteObject ($a_error=false)
 display deletion confirmation screen DEPRECATED !!! @access public More...
 
 adoptPermSaveObject ()
 ??? TODO: what is the purpose of this function? @access public More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) overwritten to prevent displaying of role templates in local role folders More...
 
 saveObject ()
 save object @access public More...
 
 getAdminTabs ()
 Add role folder tabs @global ilTree $tree @global ilLanguage $lng. More...
 
 editSettingsObject (ilPropertyFormGUI $a_form=null)
 
 saveSettingsObject ()
 
 addToExternalSettingsForm ($a_form_id)
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 

Data Fields

const COPY_ADD_PERMISSIONS = 1
 
const COPY_CLONE_PERMISSIONS = 2
 
const COPY_REMOVE_PERMISSIONS = 3
 
const COPY_CHANGE_EXISTING_OBJECTS = 1
 
 $type
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 roleSearchObject ()
 Search target roles. More...
 
 initRoleSearchForm ()
 Init role search form. More...
 
 roleSearchFormObject ()
 Parse search query @global \ilCtrl $ilCtrl. More...
 
 roleSearchListObject ()
 List roles. More...
 
 chooseCopyBehaviourObject (\ilPropertyFormGUI $form=null)
 Choose option for copying roles/role templates. More...
 
 initCopyBehaviourForm (int $copy_source)
 Show copy behaviour form. More...
 
 adjustRoleObject ()
 Copy role. More...
 
 doAddRolePermissions ($source, $target)
 do add role permission More...
 
 removeRolePermissionsObject ()
 Remove role permissions. More...
 
 doRemoveRolePermissions ($source, $target)
 do add role permission More...
 
 doCopyRole ($source, $target)
 Perform copy of role. More...
 
 doChangeExistingObjects ($a_start_obj, $a_target_role, $a_operation_mode, $a_source_role)
 Do change existing objects. More...
 
 applyFilterObject ()
 Apply role filter. More...
 
 confirmDeleteObject ()
 Confirm deletion of roles. More...
 
 deleteRoleObject ()
 Delete roles. More...
 
 initSettingsForm ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Private Attributes

 $logger = null
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjRoleFolderGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference 
)

Constructor @access public.

Definition at line 62 of file class.ilObjRoleFolderGUI.php.

63 {
64 global $DIC;
65
66 $lng = $DIC['lng'];
67 $this->logger = $DIC->logger()->ac();
68
69 $this->type = "rolf";
70 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
71 $lng->loadLanguageModule('rbac');
72 }
global $DIC
Definition: saml.php:7

References $DIC, and ilObjectGUI\$lng.

Member Function Documentation

◆ addToExternalSettingsForm()

ilObjRoleFolderGUI::addToExternalSettingsForm (   $a_form_id)

Definition at line 971 of file class.ilObjRoleFolderGUI.php.

972 {
973 switch ($a_form_id) {
975
976 include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
978
979 $fields = array('adm_adm_role_protect' => array($security->isAdminRoleProtected(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
980
981 return array(array("editSettings", $fields));
982
984
985 include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
987
988 $subitems = null;
989 if ((bool) $privacy->enabledRbacLog()) {
990 $subitems = array('rbac_log_age' => $privacy->getRbacLogAge());
991 }
992 $fields = array('rbac_log' => array($privacy->enabledRbacLog(), ilAdministrationSettingsFormHandler::VALUE_BOOL, $subitems));
993
994 return array(array("editSettings", $fields));
995 }
996 }
static _getInstance()
Get instance of ilPrivacySettings.
static _getInstance()
Get instance of ilSecuritySettings.

References ilPrivacySettings\_getInstance(), ilSecuritySettings\_getInstance(), ilAdministrationSettingsFormHandler\FORM_PRIVACY, ilAdministrationSettingsFormHandler\FORM_SECURITY, and ilAdministrationSettingsFormHandler\VALUE_BOOL.

+ Here is the call graph for this function:

◆ adjustRoleObject()

ilObjRoleFolderGUI::adjustRoleObject ( )
protected

Copy role.

Definition at line 411 of file class.ilObjRoleFolderGUI.php.

412 {
413 global $DIC;
414
415 $this->checkPermission('write');
416 $review = $DIC->rbac()->review();
417
418 $roles = explode(',', $_POST['roles']);
419 $source = (int) $_REQUEST['csource'];
420
422 if ($form->checkInput()) {
423
424 $adjustment_type = $form->getInput('type');
425 foreach ((array) $roles as $role_id) {
426 if ($role_id != $source) {
427
428 $start_obj = $review->getRoleFolderOfRole($role_id);
429 $this->logger->debug('Start object: ' . $start_obj);
430
431 switch ($adjustment_type) {
433 $change_existing = (bool) $form->getInput('add_ce_type');
435 $source,
436 $role_id
437 );
438 if ($change_existing) {
440 $start_obj,
441 $role_id,
443 $source
444 );
445 }
446 break;
448 $change_existing = (bool) $form->getInput('clone_ce_type');
449 $this->doCopyRole(
450 $source,
451 $role_id
452 );
453 if ($change_existing) {
455 $start_obj,
456 $role_id,
458 $source
459 );
460 }
461 break;
463 $change_existing = (bool) $form->getInput('remove_ce_type');
465 $source,
466 $role_id
467 );
468 if ($change_existing) {
470 $start_obj,
471 $role_id,
473 $source
474 );
475 }
476 break;
477 }
478 }
479 }
480 ilUtil::sendSuccess($this->lng->txt('rbac_copy_finished'), true);
481 $this->ctrl->redirect($this, 'view');
482 }
483 }
$source
Definition: linkback.php:22
$_POST["username"]
doAddRolePermissions($source, $target)
do add role permission
doRemoveRolePermissions($source, $target)
do add role permission
doChangeExistingObjects($a_start_obj, $a_target_role, $a_operation_mode, $a_source_role)
Do change existing objects.
doCopyRole($source, $target)
Perform copy of role.
initCopyBehaviourForm(int $copy_source)
Show copy behaviour form.
const MODE_REMOVE_OPERATIONS
const MODE_ADD_OPERATIONS
const MODE_READ_OPERATIONS
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
if(isset($_POST['submit'])) $form

References $_POST, $DIC, $form, $source, ilObjectGUI\checkPermission(), COPY_ADD_PERMISSIONS, COPY_CLONE_PERMISSIONS, COPY_REMOVE_PERMISSIONS, doAddRolePermissions(), doChangeExistingObjects(), doCopyRole(), doRemoveRolePermissions(), initCopyBehaviourForm(), ilObjRole\MODE_ADD_OPERATIONS, ilObjRole\MODE_READ_OPERATIONS, and ilObjRole\MODE_REMOVE_OPERATIONS.

+ Here is the call graph for this function:

◆ adoptPermSaveObject()

ilObjRoleFolderGUI::adoptPermSaveObject ( )

??? TODO: what is the purpose of this function? @access public

Definition at line 761 of file class.ilObjRoleFolderGUI.php.

762 {
763 ilUtil::sendSuccess($this->lng->txt("saved_successfully"), true);
764
765 $this->ctrl->redirect($this, "view");
766 }

◆ applyFilterObject()

ilObjRoleFolderGUI::applyFilterObject ( )
protected

Apply role filter.

Definition at line 627 of file class.ilObjRoleFolderGUI.php.

628 {
629 include_once './Services/AccessControl/classes/class.ilRoleTableGUI.php';
630 $table = new ilRoleTableGUI($this, 'view');
631 $table->init();
632 $table->resetOffset();
633 $table->writeFilterToSession();
634
635 $this->viewObject();
636 }
viewObject()
@global ilErrorHandler $ilErr @global ilRbacSystem $rbacsystem @global ilToolbarGUI $ilToolbar
TableGUI for the presentation og roles and role templates.
if(empty($password)) $table
Definition: pwgen.php:24

References $table, and viewObject().

+ Here is the call graph for this function:

◆ chooseCopyBehaviourObject()

ilObjRoleFolderGUI::chooseCopyBehaviourObject ( \ilPropertyFormGUI  $form = null)
protected

Choose option for copying roles/role templates.

Parameters
ilPropertyFormGUI | null$form

Definition at line 278 of file class.ilObjRoleFolderGUI.php.

279 {
280 global $DIC;
281
282 $copy_source = (int) $_REQUEST['csource'];
283
284 $this->ctrl->saveParameter($this, 'csource', $copy_source);
285 $this->tabs_gui->clearTargets();
286 $this->tabs_gui->setBackTarget(
287 $this->lng->txt('rbac_back_to_overview'),
288 $this->ctrl->getLinkTarget($this, 'view')
289 );
290 if (!$form instanceof \ilPropertyFormGUI) {
291 $form = $this->initCopyBehaviourForm($copy_source);
292 }
293 $this->tpl->setContent($form->getHTML());
294 }
This class represents a property form user interface.

References $DIC, $form, and initCopyBehaviourForm().

+ Here is the call graph for this function:

◆ confirmDeleteObject()

ilObjRoleFolderGUI::confirmDeleteObject ( )
protected

Confirm deletion of roles.

Definition at line 655 of file class.ilObjRoleFolderGUI.php.

656 {
657 global $DIC;
658
659 $ilCtrl = $DIC['ilCtrl'];
660
661 $roles = (array) ($_POST['roles'] ?? []);
662 if (!count($roles)) {
663 ilUtil::sendFailure($this->lng->txt('select_one'), true);
664 $ilCtrl->redirect($this, 'view');
665 }
666
667 $question = $this->lng->txt('rbac_role_delete_qst');
668
669 include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
670 $confirm = new ilConfirmationGUI();
671 $confirm->setHeaderText($question);
672 $confirm->setFormAction($ilCtrl->getFormAction($this));
673 $confirm->setHeaderText($this->lng->txt("info_delete_sure"));
674 $confirm->setConfirm($this->lng->txt('delete'), 'deleteRole');
675 $confirm->setCancel($this->lng->txt('cancel'), 'cancel');
676
677
678 include_once './Services/AccessControl/classes/class.ilObjRole.php';
679 foreach ($roles as $role_id) {
680 $confirm->addItem(
681 'roles[]',
682 $role_id,
684 );
685 }
686 $this->tpl->setContent($confirm->getHTML());
687 }
Confirmation screen class.
static _getTranslation($a_role_title)
static _lookupTitle($a_id)
lookup object title
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
global $ilCtrl
Definition: ilias.php:18

References $_POST, $DIC, $ilCtrl, ilObjRole\_getTranslation(), ilObject\_lookupTitle(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ createObject()

ilObjRoleFolderGUI::createObject ( )

role folders are created automatically DEPRECATED !!! @access public

Reimplemented from ilObjectGUI.

Definition at line 734 of file class.ilObjRoleFolderGUI.php.

735 {
736 $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
737
738 /*
739 $this->object->setTitle($this->lng->txt("obj_".$this->object->getType()."_local"));
740 $this->object->setDescription("obj_".$this->object->getType()."_local_desc");
741
742 $this->saveObject();
743 */
744 }
redirection script todo: (a better solution should control the processing via a xml file)

◆ deleteObject()

ilObjRoleFolderGUI::deleteObject (   $a_error = false)

display deletion confirmation screen DEPRECATED !!! @access public

Reimplemented from ilObjectGUI.

Definition at line 751 of file class.ilObjRoleFolderGUI.php.

752 {
753 $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
754 }

◆ deleteRoleObject()

ilObjRoleFolderGUI::deleteRoleObject ( )
protected

Delete roles.

Definition at line 692 of file class.ilObjRoleFolderGUI.php.

693 {
694 global $DIC;
695
696 $rbacsystem = $DIC['rbacsystem'];
697 $ilErr = $DIC['ilErr'];
698 $rbacreview = $DIC['rbacreview'];
699 $ilCtrl = $DIC['ilCtrl'];
700
701 if (!$rbacsystem->checkAccess('delete', $this->object->getRefId())) {
702 $ilErr->raiseError(
703 $this->lng->txt('msg_no_perm_delete'),
704 $ilErr->MESSAGE
705 );
706 }
707
708 foreach ((array) $_POST['roles'] as $id) {
709 // instatiate correct object class (role or rolt)
711
712 if ($obj->getType() == "role") {
713 $rolf_arr = $rbacreview->getFoldersAssignedToRole($obj->getId(), true);
714 $obj->setParent($rolf_arr[0]);
715 }
716
717 $obj->delete();
718 }
719
720 // set correct return location if rolefolder is removed
721 ilUtil::sendSuccess($this->lng->txt("msg_deleted_roles_rolts"), true);
722 $ilCtrl->redirect($this, 'view');
723 }
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
if(!array_key_exists('StateId', $_REQUEST)) $id

References $_POST, $DIC, $id, $ilCtrl, ilObjectGUI\$ilErr, ilObjectGUI\$rbacreview, and ilObjectFactory\getInstanceByObjId().

+ Here is the call graph for this function:

◆ doAddRolePermissions()

ilObjRoleFolderGUI::doAddRolePermissions (   $source,
  $target 
)
protected

do add role permission

Definition at line 489 of file class.ilObjRoleFolderGUI.php.

490 {
491 global $DIC;
492
493 $rbacadmin = $DIC->rbac()->admin();
494 $rbacreview = $DIC->rbac()->review();
495
496 $source_definition = $rbacreview->getRoleFolderOfRole($source);
497 $rbacadmin->copyRolePermissionUnion(
498 $source,
499 $source_definition,
500 $target,
501 $rbacreview->getRoleFolderOfRole($target),
502 $target,
503 $rbacreview->getRoleFolderOfRole($target)
504 );
505 }
$target
Definition: test.php:19

References $DIC, ilObjectGUI\$rbacreview, $source, and $target.

Referenced by adjustRoleObject().

+ Here is the caller graph for this function:

◆ doChangeExistingObjects()

ilObjRoleFolderGUI::doChangeExistingObjects (   $a_start_obj,
  $a_target_role,
  $a_operation_mode,
  $a_source_role 
)
protected

Do change existing objects.

Definition at line 582 of file class.ilObjRoleFolderGUI.php.

583 {
584 global $DIC;
585
586 $review = $DIC->rbac()->review();
587
588 if (!$a_start_obj) {
589 $this->logger->warning('Missing parameter start object.');
590 $this->logger->logStack(\ilLogLevel::WARNING);
591 throw new InvalidArgumentException('Missing parameter: start object');
592 }
593 // the mode is unchanged and read out from the target object
594 $target_ref_id = $review->getRoleFolderOfRole($a_target_role);
595 if ($review->isProtected($target_ref_id, $a_target_role)) {
597 }
598 else {
600 }
601 if ($a_start_obj) {
602
603 $operation_stack = [];
604 if ($a_operation_mode !== \ilObjRole::MODE_READ_OPERATIONS) {
605 $operation_stack[] = $review->getAllOperationsOfRole($a_source_role, $a_start_obj);
606 }
607
608 $this->logger->debug('Current operation stack');
609 $this->logger->dump($operation_stack);
610
611 $role = new ilObjRole($a_target_role);
612 $role->changeExistingObjects(
613 $a_start_obj,
614 $mode,
615 array('all'),
616 [],
617 $a_operation_mode,
618 $operation_stack
619 );
620 }
621 }
Class ilObjRole.
const MODE_UNPROTECTED_KEEP_LOCAL_POLICIES
const MODE_PROTECTED_KEEP_LOCAL_POLICIES

References $DIC, ilObjRole\MODE_PROTECTED_KEEP_LOCAL_POLICIES, ilObjRole\MODE_READ_OPERATIONS, ilObjRole\MODE_UNPROTECTED_KEEP_LOCAL_POLICIES, and ilLogLevel\WARNING.

Referenced by adjustRoleObject().

+ Here is the caller graph for this function:

◆ doCopyRole()

ilObjRoleFolderGUI::doCopyRole (   $source,
  $target 
)
protected

Perform copy of role.

Definition at line 561 of file class.ilObjRoleFolderGUI.php.

562 {
563 global $DIC;
564
565 $rbacadmin = $DIC->rbac()->admin();
566 $rbacreview = $DIC->rbac()->review();
567
568 $target_obj = $rbacreview->getRoleFolderOfRole($target);
569 $source_obj = $rbacreview->getRoleFolderOfRole($source);
570 // Copy role template permissions
571 $rbacadmin->copyRoleTemplatePermissions(
572 $source,
573 $source_obj,
574 $target_obj,
575 $target
576 );
577 }

References $DIC, ilObjectGUI\$rbacreview, $source, and $target.

Referenced by adjustRoleObject().

+ Here is the caller graph for this function:

◆ doRemoveRolePermissions()

ilObjRoleFolderGUI::doRemoveRolePermissions (   $source,
  $target 
)
protected

do add role permission

Definition at line 536 of file class.ilObjRoleFolderGUI.php.

537 {
538 global $DIC;
539
540 $rbacadmin = $DIC->rbac()->admin();
541 $rbacreview = $DIC->rbac()->review();
542
543 ilLoggerFactory::getLogger('ac')->debug('Remove permission source: ' . $source);
544 ilLoggerFactory::getLogger('ac')->debug('Remove permission target: ' . $target);
545
546 $source_obj = $rbacreview->getRoleFolderOfRole($source);
547 $rbacadmin->copyRolePermissionSubtract(
548 $source,
549 $source_obj,
550 $target,
551 $rbacreview->getRoleFolderOfRole($target)
552 );
553
554 }
static getLogger($a_component_id)
Get component logger.

References $DIC, ilObjectGUI\$rbacreview, $source, $target, and ilLoggerFactory\getLogger().

Referenced by adjustRoleObject(), and removeRolePermissionsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editSettingsObject()

ilObjRoleFolderGUI::editSettingsObject ( ilPropertyFormGUI  $a_form = null)

Definition at line 881 of file class.ilObjRoleFolderGUI.php.

882 {
883 if (!$a_form) {
884 $a_form = $this->initSettingsForm();
885 }
886
887 $this->tpl->setContent($a_form->getHTML());
888 }

References initSettingsForm().

Referenced by saveSettingsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjRoleFolderGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Definition at line 74 of file class.ilObjRoleFolderGUI.php.

75 {
76 global $DIC;
77
78 $ilTabs = $DIC['ilTabs'];
79
80 $next_class = $this->ctrl->getNextClass($this);
81 $cmd = $this->ctrl->getCmd();
82 $this->prepareOutput();
83
84 switch ($next_class) {
85
86 case 'ilpermissiongui':
87 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
88 $perm_gui = new ilPermissionGUI($this);
89 $ret = &$this->ctrl->forwardCommand($perm_gui);
90 break;
91
92 default:
93 $this->ctrl->setReturn($this, "view");
94 if (!$cmd) {
95 $cmd = "view";
96 }
97 $cmd .= "Object";
98 $this->$cmd();
99
100 break;
101 }
102 return true;
103 }
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$ret
Definition: parser.php:6

References $DIC, $ret, and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjRoleFolderGUI::getAdminTabs ( )

Add role folder tabs @global ilTree $tree @global ilLanguage $lng.

Parameters
ilTabsGUI$tabs_gui

Reimplemented from ilObjectGUI.

Definition at line 850 of file class.ilObjRoleFolderGUI.php.

851 {
852 if ($this->checkPermissionBool("visible,read")) {
853 $this->tabs_gui->addTarget(
854 "view",
855 $this->ctrl->getLinkTarget($this, "view"),
856 array("", "view"),
857 get_class($this)
858 );
859
860 $this->tabs_gui->addTarget(
861 "settings",
862 $this->ctrl->getLinkTarget($this, "editSettings"),
863 array("editSettings"),
864 get_class($this)
865 );
866 }
867
868 if ($this->checkPermissionBool("edit_permission")) {
869 $this->tabs_gui->addTarget(
870 "perm_settings",
871 $this->ctrl->getLinkTargetByClass(
872 array(get_class($this),'ilpermissiongui'),
873 "perm"
874 ),
875 "",
876 "ilpermissiongui"
877 );
878 }
879 }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.

References ilObjectGUI\checkPermissionBool().

+ Here is the call graph for this function:

◆ initCopyBehaviourForm()

ilObjRoleFolderGUI::initCopyBehaviourForm ( int  $copy_source)
protected

Show copy behaviour form.

Definition at line 299 of file class.ilObjRoleFolderGUI.php.

300 {
301 // not only for role templates; add/remove permissions is also applicable for roles
302 $full_featured = true;
303
304 $form = new ilPropertyFormGUI();
305 $form->setTitle($this->lng->txt('rbac_copy_behaviour'));
306 $form->setFormAction($this->ctrl->getFormAction($this, 'chooseCopyBehaviour'));
307
308 $copy_type = new \ilRadioGroupInputGUI(
309 $this->lng->txt('rbac_form_copy_roles_adjust_type'),
310 'type'
311 );
312 $copy_type->setRequired(true);
313 $copy_type->setValue(self::COPY_CLONE_PERMISSIONS);
314
315 if ($full_featured) {
316 $add = new \ilRadioOption(
317 $this->lng->txt('rbac_form_copy_roles_adjust_type_add'),
318 self::COPY_ADD_PERMISSIONS,
319 $this->lng->txt('rbac_form_copy_roles_adjust_type_add_info')
320 );
321 $copy_type->addOption($add);
322
323 $ce_type_add = new \ilRadioGroupInputGUI(
324 '',
325 'add_ce_type'
326 );
327 $ce_type_add->setRequired(true);
328 $ce_add_yes = new \ilRadioOption(
329 $this->lng->txt('rbac_form_copy_roles_ce_add_yes'),
330 self::COPY_CHANGE_EXISTING_OBJECTS,
331 $this->lng->txt('rbac_form_copy_roles_ce_add_yes_info')
332 );
333 $ce_type_add->addOption($ce_add_yes);
334 $ce_add_no = new \ilRadioOption(
335 $this->lng->txt('rbac_form_copy_roles_ce_add_no'),
336 0,
337 $this->lng->txt('rbac_form_copy_roles_ce_add_no_info')
338 );
339 $ce_type_add->addOption($ce_add_no);
340 $add->addSubItem($ce_type_add);
341 }
342 $clone = new \ilRadioOption(
343 $this->lng->txt('rbac_form_copy_roles_adjust_type_clone'),
344 self::COPY_CLONE_PERMISSIONS,
345 $this->lng->txt('rbac_form_copy_roles_adjust_type_clone_info')
346 );
347 $copy_type->addOption($clone);
348
349
350 $ce_type_clone = new \ilRadioGroupInputGUI(
351 '',
352 'clone_ce_type'
353 );
354 $ce_type_clone->setRequired(true);
355 $ce_clone_yes = new \ilRadioOption(
356 $this->lng->txt('rbac_form_copy_roles_ce_clone_yes'),
357 self::COPY_CHANGE_EXISTING_OBJECTS,
358 $this->lng->txt('rbac_form_copy_roles_ce_clone_yes_info')
359 );
360 $ce_type_clone->addOption($ce_clone_yes);
361 $ce_clone_no = new \ilRadioOption(
362 $this->lng->txt('rbac_form_copy_roles_ce_clone_no'),
363 0,
364 $this->lng->txt('rbac_form_copy_roles_ce_clone_no_info')
365 );
366 $ce_type_clone->addOption($ce_clone_no);
367 $clone->addSubItem($ce_type_clone);
368
369 if ($full_featured) {
370 $remove = new \ilRadioOption(
371 $this->lng->txt('rbac_form_copy_roles_adjust_type_remove'),
372 self::COPY_REMOVE_PERMISSIONS,
373 $this->lng->txt('rbac_form_copy_roles_adjust_type_remove_info')
374 );
375 $copy_type->addOption($remove);
376 $ce_type_remove = new \ilRadioGroupInputGUI(
377 '',
378 'remove_ce_type'
379 );
380 $ce_type_remove->setRequired(true);
381 $ce_remove_yes = new \ilRadioOption(
382 $this->lng->txt('rbac_form_copy_roles_ce_remove_yes'),
383 self::COPY_CHANGE_EXISTING_OBJECTS,
384 $this->lng->txt('rbac_form_copy_roles_ce_remove_yes_info')
385 );
386 $ce_type_remove->addOption($ce_remove_yes);
387 $ce_remove_no = new \ilRadioOption(
388 $this->lng->txt('rbac_form_copy_roles_ce_remove_no'),
389 0,
390 $this->lng->txt('rbac_form_copy_roles_ce_remove_no_info')
391 );
392 $ce_type_remove->addOption($ce_remove_no);
393 $remove->addSubItem($ce_type_remove);
394 }
395
396 $form->addItem($copy_type);
397
398 $roles = new ilHiddenInputGUI('roles');
399 $roles->setValue(implode(',', (array) $_POST['roles']));
400 $form->addItem($roles);
401
402 $form->addCommandButton('roleSearchList', $this->lng->txt('back'));
403 $form->addCommandButton('adjustRole',$this->lng->txt('rbac_form_copy_roles_adjust_button'));
404 return $form;
405 }
This class represents a hidden form property in a property form.

References $_POST, and $form.

Referenced by adjustRoleObject(), chooseCopyBehaviourObject(), and removeRolePermissionsObject().

+ Here is the caller graph for this function:

◆ initRoleSearchForm()

ilObjRoleFolderGUI::initRoleSearchForm ( )
protected

Init role search form.

Definition at line 194 of file class.ilObjRoleFolderGUI.php.

195 {
196 global $DIC;
197
198 $ilCtrl = $DIC['ilCtrl'];
199
200 include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
201 $form = new ilPropertyFormGUI();
202 $form->setTitle($this->lng->txt('rbac_role_title'));
203 $form->setFormAction($ilCtrl->getFormAction($this, 'view'));
204
205 $search = new ilTextInputGUI($this->lng->txt('title'), 'title');
206 $search->setRequired(true);
207 $search->setSize(30);
208 $search->setMaxLength(255);
209 $form->addItem($search);
210
211 $form->addCommandButton('roleSearchForm', $this->lng->txt('search'));
212 return $form;
213 }
This class represents a text property in a property form.

References $DIC, $form, and $ilCtrl.

Referenced by roleSearchFormObject(), and roleSearchObject().

+ Here is the caller graph for this function:

◆ initSettingsForm()

ilObjRoleFolderGUI::initSettingsForm ( )
protected

Definition at line 925 of file class.ilObjRoleFolderGUI.php.

926 {
927 global $DIC;
928
929 $rbacreview = $DIC['rbacreview'];
930 $ilUser = $DIC['ilUser'];
931
932 $this->lng->loadLanguageModule('ps');
933
934 include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
935 include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
938
939 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
940 $form = new ilPropertyFormGUI();
941 $form->setFormAction($this->ctrl->getFormAction($this, "saveSettings"));
942 $form->setTitle($this->lng->txt('settings'));
943
944 // protected admin
945 $admin = new ilCheckboxInputGUI($GLOBALS['DIC']['lng']->txt('adm_adm_role_protect'), 'admin_role');
946 $admin->setDisabled(!$rbacreview->isAssigned($ilUser->getId(), SYSTEM_ROLE_ID));
947 $admin->setInfo($this->lng->txt('adm_adm_role_protect_info'));
948 $admin->setChecked((int) $security->isAdminRoleProtected());
949 $admin->setValue(1);
950 $form->addItem($admin);
951
952 $check = new ilCheckboxInputGui($this->lng->txt('rbac_log'), 'rbac_log');
953 $check->setInfo($this->lng->txt('rbac_log_info'));
954 $check->setChecked($privacy->enabledRbacLog());
955 $form->addItem($check);
956
957 $age = new ilNumberInputGUI($this->lng->txt('rbac_log_age'), 'rbac_log_age');
958 $age->setInfo($this->lng->txt('rbac_log_age_info'));
959 $age->setValue($privacy->getRbacLogAge());
960 $age->setMinValue(1);
961 $age->setMaxValue(24);
962 $age->setSize(2);
963 $age->setMaxLength(2);
964 $check->addSubItem($age);
965
966 $form->addCommandButton('saveSettings', $this->lng->txt('save'));
967
968 return $form;
969 }
This class represents a checkbox property in a property form.
This class represents a number property in a property form.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
$ilUser
Definition: imgupload.php:18

References $DIC, $form, $GLOBALS, $ilUser, ilObjectGUI\$rbacreview, ilPrivacySettings\_getInstance(), and ilSecuritySettings\_getInstance().

Referenced by editSettingsObject(), and saveSettingsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeRolePermissionsObject()

ilObjRoleFolderGUI::removeRolePermissionsObject ( )
protected

Remove role permissions.

Definition at line 510 of file class.ilObjRoleFolderGUI.php.

511 {
512 global $DIC;
513
514 $ilCtrl = $DIC['ilCtrl'];
515
516 // Finally copy role/rolt
517 $roles = explode(',', $_POST['roles']);
518 $source = (int) $_REQUEST['csource'];
519
520 $form = $this->initCopyBehaviourForm();
521 if ($form->checkInput()) {
522 foreach ((array) $roles as $role_id) {
523 if ($role_id != $source) {
524 $this->doRemoveRolePermissions($source, $role_id, $form->getInput('change_existing'));
525 }
526 }
527
528 ilUtil::sendSuccess($this->lng->txt('rbac_copy_finished'), true);
529 $ilCtrl->redirect($this, 'view');
530 }
531 }

References $_POST, $DIC, $form, $ilCtrl, $source, doRemoveRolePermissions(), and initCopyBehaviourForm().

+ Here is the call graph for this function:

◆ resetFilterObject()

ilObjRoleFolderGUI::resetFilterObject ( )

Reset role filter.

Definition at line 641 of file class.ilObjRoleFolderGUI.php.

642 {
643 include_once './Services/AccessControl/classes/class.ilRoleTableGUI.php';
644 $table = new ilRoleTableGUI($this, 'view');
645 $table->init();
646 $table->resetOffset();
647 $table->resetFilter();
648
649 $this->viewObject();
650 }

References $table, and viewObject().

+ Here is the call graph for this function:

◆ roleSearchFormObject()

ilObjRoleFolderGUI::roleSearchFormObject ( )
protected

Parse search query @global \ilCtrl $ilCtrl.

Definition at line 220 of file class.ilObjRoleFolderGUI.php.

221 {
222 global $DIC;
223
224 $ilCtrl = $DIC['ilCtrl'];
225
226 $_SESSION['rolf_search_query'] = '';
227 $ilCtrl->setParameter($this, 'csource', (int) $_REQUEST['csource']);
228
229 $form = $this->initRoleSearchForm();
230 if ($form->checkInput()) {
231 $_SESSION['rolf_search_query'] = $form->getInput('title');
232 return $this->roleSearchListObject();
233 }
234
235 ilUtil::sendFailure($this->lng->txt('msg_no_search_string'), true);
236 $form->setValuesByPost();
237 $ilCtrl->redirect($this, 'roleSearch');
238 }
$_SESSION["AccountId"]
initRoleSearchForm()
Init role search form.

References $_SESSION, $DIC, $form, $ilCtrl, initRoleSearchForm(), roleSearchListObject(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ roleSearchListObject()

ilObjRoleFolderGUI::roleSearchListObject ( )
protected

List roles.

Definition at line 243 of file class.ilObjRoleFolderGUI.php.

244 {
245 global $DIC;
246
247 $ilTabs = $DIC['ilTabs'];
248 $ilCtrl = $DIC['ilCtrl'];
249
250 $ilTabs->clearTargets();
251 $ilTabs->setBackTarget(
252 $this->lng->txt('rbac_back_to_overview'),
253 $this->ctrl->getLinkTarget($this, 'view')
254 );
255
256 $ilCtrl->setParameter($this, 'csource', (int) $_REQUEST['csource']);
257
258 if (strlen($_SESSION['rolf_search_query'])) {
259 ilUtil::sendInfo($this->lng->txt('rbac_select_copy_targets'));
260
261 include_once './Services/AccessControl/classes/class.ilRoleTableGUI.php';
262 $table = new ilRoleTableGUI($this, 'roleSearchList');
264 $table->setRoleTitleFilter($_SESSION['rolf_search_query']);
265 $table->init();
266 $table->parse($this->object->getId());
267 return $this->tpl->setContent($table->getHTML());
268 }
269
270 ilUtil::sendFailure($this->lng->txt('msg_no_search_string'), true);
271 $ilCtrl->redirect($this, 'roleSearch');
272 }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.

References $_SESSION, $DIC, $ilCtrl, $table, ilUtil\sendFailure(), ilUtil\sendInfo(), and ilRoleTableGUI\TYPE_SEARCH.

Referenced by roleSearchFormObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ roleSearchObject()

ilObjRoleFolderGUI::roleSearchObject ( )
protected

Search target roles.

Definition at line 165 of file class.ilObjRoleFolderGUI.php.

166 {
167 global $DIC;
168
169 $rbacsystem = $DIC['rbacsystem'];
170 $ilCtrl = $DIC['ilCtrl'];
171 $ilTabs = $DIC['ilTabs'];
172 $ilErr = $DIC['ilErr'];
173
174 $ilTabs->clearTargets();
175 $ilTabs->setBackTarget(
176 $this->lng->txt('rbac_back_to_overview'),
177 $this->ctrl->getLinkTarget($this, 'view')
178 );
179
180 if (!$rbacsystem->checkAccess('visible,read', $this->object->getRefId())) {
181 $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->MESSAGE);
182 }
183
184 $ilCtrl->setParameter($this, 'csource', (int) $_REQUEST['csource']);
185 ilUtil::sendInfo($this->lng->txt('rbac_choose_copy_targets'));
186
187 $form = $this->initRoleSearchForm();
188 $this->tpl->setContent($form->getHTML());
189 }

References $DIC, $form, $ilCtrl, ilObjectGUI\$ilErr, initRoleSearchForm(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ saveObject()

ilObjRoleFolderGUI::saveObject ( )

save object @access public

Reimplemented from ilObjectGUI.

Definition at line 822 of file class.ilObjRoleFolderGUI.php.

823 {
824 global $DIC;
825
826 $rbacadmin = $DIC['rbacadmin'];
827
828 // role folders are created automatically
829 $_GET["new_type"] = $this->object->getType();
830 $_POST["Fobject"]["title"] = $this->object->getTitle();
831 $_POST["Fobject"]["desc"] = $this->object->getDescription();
832
833 // always call parent method first to create an object_data entry & a reference
834 $newObj = parent::saveObject();
835
836 // put here your object specific stuff
837
838 // always send a message
839 ilUtil::sendSuccess($this->lng->txt("rolf_added"), true);
840
841 $this->ctrl->redirect($this, "view");
842 }
$_GET["client_id"]

References $_GET, $_POST, and $DIC.

◆ saveSettingsObject()

ilObjRoleFolderGUI::saveSettingsObject ( )

Definition at line 890 of file class.ilObjRoleFolderGUI.php.

891 {
892 global $DIC;
893
894 $ilErr = $DIC['ilErr'];
895 $rbacreview = $DIC['rbacreview'];
896 $ilUser = $DIC['ilUser'];
897
898 if (!$this->checkPermissionBool("write")) {
899 $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->MESSAGE);
900 }
901
902 $form = $this->initSettingsForm();
903 if ($form->checkInput()) {
904 include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
906 $privacy->enableRbacLog((int) $_POST['rbac_log']);
907 $privacy->setRbacLogAge((int) $_POST['rbac_log_age']);
908 $privacy->save();
909
910 if ($rbacreview->isAssigned($ilUser->getId(), SYSTEM_ROLE_ID)) {
911 include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
913 $security->protectedAdminRole((int) $_POST['admin_role']);
914 $security->save();
915 }
916
917 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
918 $this->ctrl->redirect($this, "editSettings");
919 }
920
921 $form->setValuesByPost();
923 }
editSettingsObject(ilPropertyFormGUI $a_form=null)

References $_POST, $DIC, $form, ilObjectGUI\$ilErr, $ilUser, ilObjectGUI\$rbacreview, ilPrivacySettings\_getInstance(), ilSecuritySettings\_getInstance(), ilObjectGUI\checkPermissionBool(), editSettingsObject(), and initSettingsForm().

+ Here is the call graph for this function:

◆ showPossibleSubObjects()

ilObjRoleFolderGUI::showPossibleSubObjects ( )

show possible subobjects (pulldown menu) overwritten to prevent displaying of role templates in local role folders

@access public

Reimplemented from ilObjectGUI.

Definition at line 774 of file class.ilObjRoleFolderGUI.php.

775 {
776 global $DIC;
777
778 $rbacsystem = $DIC['rbacsystem'];
779
780 $d = $this->objDefinition->getCreatableSubObjects($this->object->getType());
781
782 if ($this->object->getRefId() != ROLE_FOLDER_ID or !$rbacsystem->checkAccess('create_rolt', ROLE_FOLDER_ID)) {
783 unset($d["rolt"]);
784 }
785
786 if (!$rbacsystem->checkAccess('create_role', $this->object->getRefId())) {
787 unset($d["role"]);
788 }
789
790 if (count($d) > 0) {
791 foreach ($d as $row) {
792 $count = 0;
793 if ($row["max"] > 0) {
794 //how many elements are present?
795 for ($i = 0; $i < count($this->data["ctrl"]); $i++) {
796 if ($this->data["ctrl"][$i]["type"] == $row["name"]) {
797 $count++;
798 }
799 }
800 }
801 if ($row["max"] == "" || $count < $row["max"]) {
802 $subobj[] = $row["name"];
803 }
804 }
805 }
806
807 if (is_array($subobj)) {
808 //build form
809 $opts = ilUtil::formSelect(12, "new_type", $subobj);
810 $this->tpl->setCurrentBlock("add_object");
811 $this->tpl->setVariable("SELECT_OBJTYPE", $opts);
812 $this->tpl->setVariable("BTN_NAME", "create");
813 $this->tpl->setVariable("TXT_ADD", $this->lng->txt("add"));
814 $this->tpl->parseCurrentBlock();
815 }
816 }
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.
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d
Definition: date.php:296
$i
Definition: disco.tpl.php:19
$row
$this data['403_header']

References $d, $DIC, $i, $row, data, and ilUtil\formSelect().

+ Here is the call graph for this function:

◆ viewObject()

ilObjRoleFolderGUI::viewObject ( )

@global ilErrorHandler $ilErr @global ilRbacSystem $rbacsystem @global ilToolbarGUI $ilToolbar

Reimplemented from ilObjectGUI.

Definition at line 111 of file class.ilObjRoleFolderGUI.php.

112 {
113 global $DIC;
114
115 $ilErr = $DIC['ilErr'];
116 $rbacsystem = $DIC['rbacsystem'];
117 $ilToolbar = $DIC['ilToolbar'];
118 $rbacreview = $DIC['rbacreview'];
119 $ilTabs = $DIC['ilTabs'];
120
121 $ilTabs->activateTab('view');
122
123 if (!$rbacsystem->checkAccess('visible,read', $this->object->getRefId())) {
124 $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->MESSAGE);
125 }
126
127
128 if ($rbacsystem->checkAccess('create_role', $this->object->getRefId())) {
129 $this->ctrl->setParameter($this, 'new_type', 'role');
130 $ilToolbar->addButton(
131 $this->lng->txt('rolf_create_role'),
132 $this->ctrl->getLinkTarget($this, 'create')
133 );
134 }
135 if ($rbacsystem->checkAccess('create_rolt', $this->object->getRefId())) {
136 $this->ctrl->setParameter($this, 'new_type', 'rolt');
137 $ilToolbar->addButton(
138 $this->lng->txt('rolf_create_rolt'),
139 $this->ctrl->getLinkTarget($this, 'create')
140 );
141 $this->ctrl->clearParameters($this);
142 }
143
144 if (
145 $rbacsystem->checkAccess('create_rolt', $this->object->getRefId()) ||
146 $rbacsystem->checkAccess('create_rolt', $this->object->getRefId())
147 ) {
148 $ilToolbar->addButton(
149 $this->lng->txt('rbac_import_role'),
150 $this->ctrl->getLinkTargetByClass('ilPermissionGUI', 'displayImportRoleForm')
151 );
152 }
153
154 include_once './Services/AccessControl/classes/class.ilRoleTableGUI.php';
155 $table = new ilRoleTableGUI($this, 'view');
156 $table->init();
157 $table->parse($this->object->getId());
158
159 $this->tpl->setContent($table->getHTML());
160 }

References $DIC, ilObjectGUI\$ilErr, ilObjectGUI\$rbacreview, and $table.

Referenced by applyFilterObject(), and resetFilterObject().

+ Here is the caller graph for this function:

Field Documentation

◆ $logger

ilObjRoleFolderGUI::$logger = null
private

Definition at line 48 of file class.ilObjRoleFolderGUI.php.

◆ $type

ilObjRoleFolderGUI::$type

Definition at line 56 of file class.ilObjRoleFolderGUI.php.

◆ COPY_ADD_PERMISSIONS

const ilObjRoleFolderGUI::COPY_ADD_PERMISSIONS = 1

Definition at line 40 of file class.ilObjRoleFolderGUI.php.

Referenced by adjustRoleObject().

◆ COPY_CHANGE_EXISTING_OBJECTS

const ilObjRoleFolderGUI::COPY_CHANGE_EXISTING_OBJECTS = 1

Definition at line 43 of file class.ilObjRoleFolderGUI.php.

◆ COPY_CLONE_PERMISSIONS

const ilObjRoleFolderGUI::COPY_CLONE_PERMISSIONS = 2

Definition at line 41 of file class.ilObjRoleFolderGUI.php.

Referenced by adjustRoleObject().

◆ COPY_REMOVE_PERMISSIONS

const ilObjRoleFolderGUI::COPY_REMOVE_PERMISSIONS = 3

Definition at line 42 of file class.ilObjRoleFolderGUI.php.

Referenced by adjustRoleObject().


The documentation for this class was generated from the following file: