ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilObjRoleFolderGUI Class Reference

Class ilObjRoleFolderGUI. More...

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

Public Member Functions

 ilObjRoleFolderGUI ($a_data, $a_id, $a_call_by_reference)
 Constructor public. More...
 
 executeCommand ()
 
 viewObject ()
 ilErrorHandler $ilErr ilRbacSystem $rbacsystem ilToolbarGUI $ilToolbar More...
 
 resetFilterObject ()
 Reset role filter. More...
 
 createObject ()
 role folders are created automatically DEPRECATED !!! public More...
 
 deleteObject ()
 display deletion confirmation screen DEPRECATED !!! public More...
 
 adoptPermSaveObject ()
 ??? TODO: what is the purpose of this function? public More...
 
 showPossibleSubObjects ($a_tpl)
 show possible subobjects (pulldown menu) overwritten to prevent displaying of role templates in local role folders More...
 
 saveObject ()
 save object public More...
 
 getAdminTabs (&$tabs_gui)
 Add role folder tabs ilTree $tree ilLanguage $lng. More...
 
 editSettingsObject (ilPropertyFormGUI $a_form=null)
 
 saveSettingsObject ()
 
 addToExternalSettingsForm ($a_form_id)
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
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...
 
 getAdminTabs (&$tabs_gui)
 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 ($in_rep=false)
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object 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...
 

Data Fields

 $type
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $ilias
 
 $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 type $ilCtrl. More...
 
 roleSearchListObject ()
 List roles. More...
 
 chooseCopyBehaviourObject ()
 Chosse change existing objects,... More...
 
 initCopyBehaviourForm ()
 Show copy behaviour form. More...
 
 copyRoleObject ()
 Copy role. More...
 
 addRolePermissionsObject ()
 Add role permissions. More...
 
 doAddRolePermissions ($source, $target, $change_existing)
 do add role permission More...
 
 removeRolePermissionsObject ()
 Remove role permissions. More...
 
 doRemoveRolePermissions ($source, $target, $change_existing)
 do add role permission More...
 
 doCopyRole ($source, $target, $change_existing)
 Perform copy of role ilTree $tree <type> $rbacadmin <type> $rbacreview. More...
 
 doChangeExistingObjects ($a_start_obj, $a_target_role)
 Do change existing objects type $rbacreview. More...
 
 applyFilterObject ()
 Apply role filter. More...
 
 confirmDeleteObject ()
 Confirm deletion of roles. More...
 
 deleteRoleObject ()
 Delete roles. More...
 
 initSettingsForm ()
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 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 public More...
 
 setAdminTabs ()
 set admin tabs 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...
 
 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...
 
 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...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 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 ($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...
 

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
 $tmp_import_dir
 

Detailed Description

Member Function Documentation

◆ addRolePermissionsObject()

ilObjRoleFolderGUI::addRolePermissionsObject ( )
protected

Add role permissions.

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

References $_POST, $_REQUEST, $ilCtrl, doAddRolePermissions(), initCopyBehaviourForm(), and ilUtil\sendSuccess().

333  {
334  global $ilCtrl;
335 
336  // Finally copy role/rolt
337  $roles = explode(',',$_POST['roles']);
338  $source = (int) $_REQUEST['copy_source'];
339 
340  $form = $this->initCopyBehaviourForm();
341  if($form->checkInput())
342  {
343  foreach((array) $roles as $role_id)
344  {
345  if($role_id != $source)
346  {
347  $this->doAddRolePermissions($source,$role_id,$form->getInput('change_existing'));
348  }
349  }
350 
351  ilUtil::sendSuccess($this->lng->txt('rbac_copy_finished'),true);
352  $ilCtrl->redirect($this,'view');
353  }
354  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
initCopyBehaviourForm()
Show copy behaviour form.
doAddRolePermissions($source, $target, $change_existing)
do add role permission
+ Here is the call graph for this function:

◆ addToExternalSettingsForm()

ilObjRoleFolderGUI::addToExternalSettingsForm (   $a_form_id)

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

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

872  {
873  switch($a_form_id)
874  {
876 
877  include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
878  $security = ilSecuritySettings::_getInstance();
879 
880  $fields = array('adm_adm_role_protect' => array($security->isAdminRoleProtected(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
881 
882  return array(array("editSettings", $fields));
883 
885 
886  include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
887  $privacy = ilPrivacySettings::_getInstance();
888 
889  $subitems = null;
890  if((bool)$privacy->enabledRbacLog())
891  {
892  $subitems = array('rbac_log_age' => $privacy->getRbacLogAge());
893  }
894  $fields = array('rbac_log' => array($privacy->enabledRbacLog(), ilAdministrationSettingsFormHandler::VALUE_BOOL, $subitems));
895 
896  return array(array("editSettings", $fields));
897  }
898  }
static _getInstance()
Get instance of ilPrivacySettings.
static _getInstance()
Get instance of ilSecuritySettings.
+ Here is the call graph for this function:

◆ adoptPermSaveObject()

ilObjRoleFolderGUI::adoptPermSaveObject ( )

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

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

References ilUtil\sendSuccess().

658  {
659  ilUtil::sendSuccess($this->lng->txt("saved_successfully"),true);
660 
661  $this->ctrl->redirect($this, "view");
662  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
+ Here is the call graph for this function:

◆ applyFilterObject()

ilObjRoleFolderGUI::applyFilterObject ( )
protected

Apply role filter.

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

References viewObject().

527  {
528  include_once './Services/AccessControl/classes/class.ilRoleTableGUI.php';
529  $table = new ilRoleTableGUI($this,'view');
530  $table->init();
531  $table->resetOffset();
532  $table->writeFilterToSession();
533 
534  $this->viewObject();
535  }
TableGUI for the presentation og roles and role templates.
viewObject()
ilErrorHandler $ilErr ilRbacSystem $rbacsystem ilToolbarGUI $ilToolbar
+ Here is the call graph for this function:

◆ chooseCopyBehaviourObject()

ilObjRoleFolderGUI::chooseCopyBehaviourObject ( )
protected

Chosse change existing objects,...

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

References $_REQUEST, $GLOBALS, $ilCtrl, and initCopyBehaviourForm().

242  {
243  global $ilCtrl, $ilTabs;
244 
245  $ilTabs->clearTargets();
246  $ilTabs->setBackTarget(
247  $this->lng->txt('rbac_back_to_overview'),
248  $this->ctrl->getLinkTarget($this,'roleSearchList')
249  );
250 
251  $GLOBALS['ilLog']->write(__METHOD__.': '.$_REQUEST['copy_source']);
252 
253  $ilCtrl->setParameter($this,'copy_source',(int) $_REQUEST['copy_source']);
254 
255  $form = $this->initCopyBehaviourForm();
256  $this->tpl->setContent($form->getHTML());
257  }
global $ilCtrl
Definition: ilias.php:18
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276
initCopyBehaviourForm()
Show copy behaviour form.
+ Here is the call graph for this function:

◆ confirmDeleteObject()

ilObjRoleFolderGUI::confirmDeleteObject ( )
protected

Confirm deletion of roles.

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

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

555  {
556  global $ilCtrl;
557 
558  if(!count($_POST['roles']))
559  {
560  ilUtil::sendFailure($this->lng->txt('select_one'),true);
561  $ilCtrl->redirect($this,'view');
562  }
563 
564  $question = $this->lng->txt('rbac_role_delete_qst');
565 
566  include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
567  $confirm = new ilConfirmationGUI();
568  $confirm->setHeaderText($question);
569  $confirm->setFormAction($ilCtrl->getFormAction($this));
570  $confirm->setHeaderText($this->lng->txt("info_delete_sure"));
571  $confirm->setConfirm($this->lng->txt('delete'), 'deleteRole');
572  $confirm->setCancel($this->lng->txt('cancel'), 'cancel');
573 
574 
575  include_once './Services/AccessControl/classes/class.ilObjRole.php';
576  foreach($_POST['roles'] as $role_id)
577  {
578  $confirm->addItem(
579  'roles[]',
580  $role_id,
582  );
583  }
584  $this->tpl->setContent($confirm->getHTML());
585  }
$_POST['username']
Definition: cron.php:12
_getTranslation($a_role_title)
static _lookupTitle($a_id)
lookup object title
global $ilCtrl
Definition: ilias.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Confirmation screen class.
+ Here is the call graph for this function:

◆ copyRoleObject()

ilObjRoleFolderGUI::copyRoleObject ( )
protected

Copy role.

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

References $_POST, $_REQUEST, $ilCtrl, doCopyRole(), initCopyBehaviourForm(), and ilUtil\sendSuccess().

306  {
307  global $ilCtrl;
308 
309  // Finally copy role/rolt
310  $roles = explode(',',$_POST['roles']);
311  $source = (int) $_REQUEST['copy_source'];
312 
313  $form = $this->initCopyBehaviourForm();
314  if($form->checkInput())
315  {
316  foreach((array) $roles as $role_id)
317  {
318  if($role_id != $source)
319  {
320  $this->doCopyRole($source,$role_id,$form->getInput('change_existing'));
321  }
322  }
323 
324  ilUtil::sendSuccess($this->lng->txt('rbac_copy_finished'),true);
325  $ilCtrl->redirect($this,'view');
326  }
327  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
doCopyRole($source, $target, $change_existing)
Perform copy of role ilTree $tree <type> $rbacadmin <type> $rbacreview.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
initCopyBehaviourForm()
Show copy behaviour form.
+ Here is the call graph for this function:

◆ createObject()

ilObjRoleFolderGUI::createObject ( )

role folders are created automatically DEPRECATED !!! public

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

631  {
632  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
633 
634  /*
635  $this->object->setTitle($this->lng->txt("obj_".$this->object->getType()."_local"));
636  $this->object->setDescription("obj_".$this->object->getType()."_local_desc");
637 
638  $this->saveObject();
639  */
640  }
redirection script todo: (a better solution should control the processing via a xml file) ...

◆ deleteObject()

ilObjRoleFolderGUI::deleteObject ( )

display deletion confirmation screen DEPRECATED !!! public

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

648  {
649  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
650  }
redirection script todo: (a better solution should control the processing via a xml file) ...

◆ deleteRoleObject()

ilObjRoleFolderGUI::deleteRoleObject ( )
protected

Delete roles.

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

References $_POST, $ilCtrl, $ilErr, ilObjectFactory\getInstanceByObjId(), and ilUtil\sendSuccess().

591  {
592  global $rbacsystem,$ilErr,$rbacreview,$ilCtrl;
593 
594  if(!$rbacsystem->checkAccess('delete',$this->object->getRefId()))
595  {
596  $ilErr->raiseError(
597  $this->lng->txt('msg_no_perm_delete'),
598  $ilErr->MESSAGE
599  );
600  }
601 
602  foreach((array) $_POST['roles'] as $id)
603  {
604  // instatiate correct object class (role or rolt)
605  $obj = ilObjectFactory::getInstanceByObjId($id,false);
606 
607  if ($obj->getType() == "role")
608  {
609  $rolf_arr = $rbacreview->getFoldersAssignedToRole($obj->getId(),true);
610  $obj->setParent($rolf_arr[0]);
611  }
612 
613  $obj->delete();
614  }
615 
616  // set correct return location if rolefolder is removed
617  ilUtil::sendSuccess($this->lng->txt("msg_deleted_roles_rolts"),true);
618  $ilCtrl->redirect($this,'view');
619  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
+ Here is the call graph for this function:

◆ doAddRolePermissions()

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

do add role permission

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

References doChangeExistingObjects().

Referenced by addRolePermissionsObject().

360  {
361  global $rbacadmin, $rbacreview;
362 
363  $rbacadmin->copyRolePermissionUnion(
364  $source,
365  $this->object->getRefId(),
366  $target,
367  $rbacreview->getRoleFolderOfRole($target),
368  $target,
369  $rbacreview->getRoleFolderOfRole($target)
370  );
371 
372  if($change_existing)
373  {
374  $target_obj = $rbacreview->getRoleFolderOfRole($target);
375  $this->doChangeExistingObjects($target_obj, $target);
376  }
377  }
doChangeExistingObjects($a_start_obj, $a_target_role)
Do change existing objects type $rbacreview.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doChangeExistingObjects()

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

Do change existing objects type $rbacreview.

Parameters
type$a_start_obj
type$a_source_role

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

References ilObjRole\MODE_PROTECTED_DELETE_LOCAL_POLICIES, and ilObjRole\MODE_UNPROTECTED_DELETE_LOCAL_POLICIES.

Referenced by doAddRolePermissions(), and doRemoveRolePermissions().

492  {
493  global $rbacreview;
494 
495  if(!$a_start_obj)
496  {
497  // todo error handling
498  }
499 
500  include_once './Services/AccessControl/classes/class.ilObjRole.php';
501  if($rbacreview->isProtected($this->object->getRefId(),$a_source_role))
502  {
504  }
505  else
506  {
508  }
509 
510  if($a_start_obj)
511  {
512  $role = new ilObjRole($a_target_role);
513  $role->changeExistingObjects(
514  $a_start_obj,
515  $mode,
516  array('all')
517  );
518  }
519 
520  }
Class ilObjRole.
const MODE_PROTECTED_DELETE_LOCAL_POLICIES
const MODE_UNPROTECTED_DELETE_LOCAL_POLICIES
+ Here is the caller graph for this function:

◆ doCopyRole()

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

Perform copy of role ilTree $tree <type> $rbacadmin <type> $rbacreview.

Parameters
<type>$source
<type>$target
<type>$change_existing
Returns
<type>

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

References ilObjectGUI\$tree, ilObjRole\MODE_PROTECTED_DELETE_LOCAL_POLICIES, and ilObjRole\MODE_UNPROTECTED_DELETE_LOCAL_POLICIES.

Referenced by copyRoleObject().

444  {
445  global $tree, $rbacadmin, $rbacreview;
446 
447  $target_obj = $rbacreview->getRoleFolderOfRole($target);
448 
449  // Copy role template permissions
450  $rbacadmin->copyRoleTemplatePermissions(
451  $source,
452  $this->object->getRefId(),
453  $target_obj,
454  $target
455  );
456 
457  if(!$change_existing || !$target_obj)
458  {
459  return true;
460  }
461 
462  $start = $target_obj;
463 
464  include_once './Services/AccessControl/classes/class.ilObjRole.php';
465  if($rbacreview->isProtected($this->object->getRefId(),$source))
466  {
468  }
469  else
470  {
472  }
473 
474  if($start)
475  {
476  $role = new ilObjRole($target);
477  $role->changeExistingObjects(
478  $start,
479  $mode,
480  array('all')
481  );
482  }
483  }
Class ilObjRole.
const MODE_PROTECTED_DELETE_LOCAL_POLICIES
const MODE_UNPROTECTED_DELETE_LOCAL_POLICIES
+ Here is the caller graph for this function:

◆ doRemoveRolePermissions()

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

do add role permission

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

References doChangeExistingObjects(), and ilLoggerFactory\getLogger().

Referenced by removeRolePermissionsObject().

410  {
411  global $rbacadmin, $rbacreview;
412 
413  ilLoggerFactory::getLogger('ac')->debug('Remove permission source: ' . $source);
414  ilLoggerFactory::getLogger('ac')->debug('Remove permission target: ' . $target);
415  ilLoggerFactory::getLogger('ac')->debug('Remove permission change existing: ' . $change_existing);
416 
417  $rbacadmin->copyRolePermissionSubtract(
418  $source,
419  $this->object->getRefId(),
420  $target,
421  $rbacreview->getRoleFolderOfRole($target)
422  );
423 
424  if($change_existing)
425  {
426  $target_obj = $rbacreview->getRoleFolderOfRole($target);
427  $this->doChangeExistingObjects($target_obj, $target);
428  }
429  }
doChangeExistingObjects($a_start_obj, $a_target_role)
Do change existing objects type $rbacreview.
static getLogger($a_component_id)
Get component logger.
+ 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 784 of file class.ilObjRoleFolderGUI.php.

References initSettingsForm().

Referenced by saveSettingsObject().

785  {
786  if(!$a_form)
787  {
788  $a_form = $this->initSettingsForm();
789  }
790 
791  $this->tpl->setContent($a_form->getHTML());
792  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjRoleFolderGUI::executeCommand ( )

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

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

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 
71  case 'ilpermissiongui':
72  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
73  $perm_gui =& new ilPermissionGUI($this);
74  $ret =& $this->ctrl->forwardCommand($perm_gui);
75  break;
76 
77  default:
78  if(!$cmd)
79  {
80  $cmd = "view";
81  }
82  $cmd .= "Object";
83  $this->$cmd();
84 
85  break;
86  }
87  return true;
88  }
$cmd
Definition: sahs_server.php:35
prepareOutput()
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjRoleFolderGUI::getAdminTabs ( $tabs_gui)

Add role folder tabs ilTree $tree ilLanguage $lng.

Parameters
ilTabsGUI$tabs_gui

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

References ilObjectGUI\$lng, ilObjectGUI\$tree, and ilObjectGUI\checkPermissionBool().

754  {
755  global $tree,$lng;
756 
757  if ($this->checkPermissionBool("visible,read"))
758  {
759  $tabs_gui->addTarget(
760  "view",
761  $this->ctrl->getLinkTarget($this, "view"),
762  array("", "view"),
763  get_class($this)
764  );
765 
766  $tabs_gui->addTarget(
767  "settings",
768  $this->ctrl->getLinkTarget($this, "editSettings"),
769  array("editSettings"),
770  get_class($this)
771  );
772  }
773 
774  if($this->checkPermissionBool("edit_permission"))
775  {
776  $tabs_gui->addTarget("perm_settings",
777  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'),
778  "perm"),
779  "",
780  "ilpermissiongui");
781  }
782  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
+ Here is the call graph for this function:

◆ ilObjRoleFolderGUI()

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

Constructor public.

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

References ilObjectGUI\$lng, and ilObjectGUI\ilObjectGUI().

52  {
53  global $lng;
54 
55  $this->type = "rolf";
56  $this->ilObjectGUI($a_data,$a_id,$a_call_by_reference, false);
57  $lng->loadLanguageModule('rbac');
58  }
ilObjectGUI($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor public.
+ Here is the call graph for this function:

◆ initCopyBehaviourForm()

ilObjRoleFolderGUI::initCopyBehaviourForm ( )
protected

Show copy behaviour form.

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

References $_POST, $_REQUEST, $ilCtrl, ilObject\_lookupType(), and ilFormPropertyGUI\setRequired().

Referenced by addRolePermissionsObject(), chooseCopyBehaviourObject(), copyRoleObject(), and removeRolePermissionsObject().

263  {
264  global $ilCtrl;
265 
266  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
267  $form = new ilPropertyFormGUI();
268  $form->setTitle($this->lng->txt('rbac_copy_behaviour'));
269  $form->setFormAction($ilCtrl->getFormAction($this,'chooseCopyBehaviour'));
270 
271  $ce = new ilRadioGroupInputGUI($this->lng->txt('change_existing_objects'), 'change_existing');
272  $ce->setRequired(true);
273  $ce->setValue(1);
274  $form->addItem($ce);
275 
276  $ceo = new ilRadioOption($this->lng->txt('change_existing_objects'),1);
277  $ce->addOption($ceo);
278 
279  $cne = new ilRadioOption($this->lng->txt('rbac_not_change_existing_objects'), 0);
280  $ce->addOption($cne);
281 
282  $roles = new ilHiddenInputGUI('roles');
283  $roles->setValue(implode(',',(array) $_POST['roles']));
284  $form->addItem($roles);
285 
286 
287  // if source is role template show option add permission, remove permissions and copy permissions
288  if(ilObject::_lookupType((int) $_REQUEST['copy_source']) == 'rolt')
289  {
290  $form->addCommandButton('addRolePermissions', $this->lng->txt('rbac_copy_role_add_perm'));
291  $form->addCommandButton('removeRolePermissions', $this->lng->txt('rbac_copy_role_remove_perm'));
292  $form->addCommandButton('copyRole', $this->lng->txt('rbac_copy_role_copy'));
293  }
294  else
295  {
296  $form->addCommandButton('copyRole', $this->lng->txt('rbac_copy_role'));
297  }
298  return $form;
299  }
This class represents an option in a radio group.
$_POST['username']
Definition: cron.php:12
This class represents a property form user interface.
global $ilCtrl
Definition: ilias.php:18
This class represents a hidden form property in a property form.
This class represents a property in a property form.
static _lookupType($a_id, $a_reference=false)
lookup object type
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initRoleSearchForm()

ilObjRoleFolderGUI::initRoleSearchForm ( )
protected

Init role search form.

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

References $ilCtrl, and ilFormPropertyGUI\setRequired().

Referenced by roleSearchFormObject(), and roleSearchObject().

162  {
163  global $ilCtrl;
164 
165  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
166  $form = new ilPropertyFormGUI();
167  $form->setTitle($this->lng->txt('rbac_role_title'));
168  $form->setFormAction($ilCtrl->getFormAction($this,'view'));
169 
170  $search = new ilTextInputGUI($this->lng->txt('title'), 'title');
171  $search->setRequired(true);
172  $search->setSize(30);
173  $search->setMaxLength(255);
174  $form->addItem($search);
175 
176  $form->addCommandButton('roleSearchForm', $this->lng->txt('search'));
177  return $form;
178  }
This class represents a property form user interface.
global $ilCtrl
Definition: ilias.php:18
This class represents a text property in a property form.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSettingsForm()

ilObjRoleFolderGUI::initSettingsForm ( )
protected

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

References $GLOBALS, $ilUser, ilPrivacySettings\_getInstance(), ilSecuritySettings\_getInstance(), and ilFormPropertyGUI\setInfo().

Referenced by editSettingsObject(), and saveSettingsObject().

829  {
830  global $rbacreview, $ilUser;
831 
832  $this->lng->loadLanguageModule('ps');
833 
834  include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
835  include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
836  $privacy = ilPrivacySettings::_getInstance();
837  $security = ilSecuritySettings::_getInstance();
838 
839  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
840  $form = new ilPropertyFormGUI();
841  $form->setFormAction($this->ctrl->getFormAction($this, "saveSettings"));
842  $form->setTitle($this->lng->txt('settings'));
843 
844  // protected admin
845  $admin = new ilCheckboxInputGUI($GLOBALS['lng']->txt('adm_adm_role_protect'),'admin_role');
846  $admin->setDisabled(!$rbacreview->isAssigned($ilUser->getId(),SYSTEM_ROLE_ID));
847  $admin->setInfo($this->lng->txt('adm_adm_role_protect_info'));
848  $admin->setChecked((int) $security->isAdminRoleProtected());
849  $admin->setValue(1);
850  $form->addItem($admin);
851 
852  $check = new ilCheckboxInputGui($this->lng->txt('rbac_log'), 'rbac_log');
853  $check->setInfo($this->lng->txt('rbac_log_info'));
854  $check->setChecked($privacy->enabledRbacLog());
855  $form->addItem($check);
856 
857  $age = new ilNumberInputGUI($this->lng->txt('rbac_log_age'),'rbac_log_age');
858  $age->setInfo($this->lng->txt('rbac_log_age_info'));
859  $age->setValue($privacy->getRbacLogAge());
860  $age->setMinValue(1);
861  $age->setMaxValue(24);
862  $age->setSize(2);
863  $age->setMaxLength(2);
864  $check->addSubItem($age);
865 
866  $form->addCommandButton('saveSettings',$this->lng->txt('save'));
867 
868  return $form;
869  }
This class represents a property form user interface.
This class represents a checkbox property in a property form.
setInfo($a_info)
Set Information Text.
This class represents a number property in a property form.
global $ilUser
Definition: imgupload.php:15
static _getInstance()
Get instance of ilPrivacySettings.
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276
static _getInstance()
Get instance of ilSecuritySettings.
+ 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 382 of file class.ilObjRoleFolderGUI.php.

References $_POST, $_REQUEST, $ilCtrl, doRemoveRolePermissions(), initCopyBehaviourForm(), and ilUtil\sendSuccess().

383  {
384  global $ilCtrl;
385 
386  // Finally copy role/rolt
387  $roles = explode(',',$_POST['roles']);
388  $source = (int) $_REQUEST['copy_source'];
389 
390  $form = $this->initCopyBehaviourForm();
391  if($form->checkInput())
392  {
393  foreach((array) $roles as $role_id)
394  {
395  if($role_id != $source)
396  {
397  $this->doRemoveRolePermissions($source,$role_id,$form->getInput('change_existing'));
398  }
399  }
400 
401  ilUtil::sendSuccess($this->lng->txt('rbac_copy_finished'),true);
402  $ilCtrl->redirect($this,'view');
403  }
404  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
initCopyBehaviourForm()
Show copy behaviour form.
doRemoveRolePermissions($source, $target, $change_existing)
do add role permission
+ Here is the call graph for this function:

◆ resetFilterObject()

ilObjRoleFolderGUI::resetFilterObject ( )

Reset role filter.

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

References viewObject().

541  {
542  include_once './Services/AccessControl/classes/class.ilRoleTableGUI.php';
543  $table = new ilRoleTableGUI($this,'view');
544  $table->init();
545  $table->resetOffset();
546  $table->resetFilter();
547 
548  $this->viewObject();
549  }
TableGUI for the presentation og roles and role templates.
viewObject()
ilErrorHandler $ilErr ilRbacSystem $rbacsystem ilToolbarGUI $ilToolbar
+ Here is the call graph for this function:

◆ roleSearchFormObject()

ilObjRoleFolderGUI::roleSearchFormObject ( )
protected

Parse search query type $ilCtrl.

Returns
type

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

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

187  {
188  global $ilCtrl;
189 
190  $_SESSION['rolf_search_query'] = '';
191  $ilCtrl->setParameter($this,'copy_source',(int) $_REQUEST['copy_source']);
192 
193  $form = $this->initRoleSearchForm();
194  if($form->checkInput())
195  {
196  $_SESSION['rolf_search_query'] = $form->getInput('title');
197  return $this->roleSearchListObject();
198  }
199 
200  ilUtil::sendFailure($this->lng->txt('msg_no_search_string'), true);
201  $form->setValuesByPost();
202  $ilCtrl->redirect($this,'roleSearch');
203  }
$_SESSION["AccountId"]
global $ilCtrl
Definition: ilias.php:18
initRoleSearchForm()
Init role search form.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ Here is the call graph for this function:

◆ roleSearchListObject()

ilObjRoleFolderGUI::roleSearchListObject ( )
protected

List roles.

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

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

Referenced by roleSearchFormObject().

209  {
210  global $ilTabs, $ilCtrl;
211 
212  $ilTabs->clearTargets();
213  $ilTabs->setBackTarget(
214  $this->lng->txt('rbac_back_to_overview'),
215  $this->ctrl->getLinkTarget($this,'roleSearchList')
216  );
217 
218  $ilCtrl->setParameter($this,'copy_source',(int) $_REQUEST['copy_source']);
219 
220  if(strlen($_SESSION['rolf_search_query']))
221  {
222  ilUtil::sendInfo($this->lng->txt('rbac_select_copy_targets'));
223 
224  include_once './Services/AccessControl/classes/class.ilRoleTableGUI.php';
225  $table = new ilRoleTableGUI($this,'roleSearchList');
226  $table->setType(ilRoleTableGUI::TYPE_SEARCH);
227  $table->setRoleTitleFilter($_SESSION['rolf_search_query']);
228  $table->init();
229  $table->parse($this->object->getId());
230  return $this->tpl->setContent($table->getHTML());
231  }
232 
233  ilUtil::sendFailure($this->lng->txt('msg_no_search_string'), true);
234  $ilCtrl->redirect($this,'roleSearch');
235  }
$_SESSION["AccountId"]
TableGUI for the presentation og roles and role templates.
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ 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 136 of file class.ilObjRoleFolderGUI.php.

References $_REQUEST, $ilCtrl, $ilErr, initRoleSearchForm(), and ilUtil\sendInfo().

137  {
138  global $rbacsystem, $ilCtrl, $ilTabs;
139 
140  $ilTabs->clearTargets();
141  $ilTabs->setBackTarget(
142  $this->lng->txt('rbac_back_to_overview'),
143  $this->ctrl->getLinkTarget($this,'view')
144  );
145 
146  if(!$rbacsystem->checkAccess('visible,read',$this->object->getRefId()))
147  {
148  $ilErr->raiseError($this->lng->txt('permission_denied'),$ilErr->MESSAGE);
149  }
150 
151  $ilCtrl->setParameter($this,'copy_source',(int) $_REQUEST['copy_source']);
152  ilUtil::sendInfo($this->lng->txt('rbac_choose_copy_targets'));
153 
154  $form = $this->initRoleSearchForm();
155  $this->tpl->setContent($form->getHTML());
156  }
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
initRoleSearchForm()
Init role search form.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ Here is the call graph for this function:

◆ saveObject()

ilObjRoleFolderGUI::saveObject ( )

save object public

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

References $_GET, $_POST, and ilUtil\sendSuccess().

728  {
729  global $rbacadmin;
730 
731  // role folders are created automatically
732  $_GET["new_type"] = $this->object->getType();
733  $_POST["Fobject"]["title"] = $this->object->getTitle();
734  $_POST["Fobject"]["desc"] = $this->object->getDescription();
735 
736  // always call parent method first to create an object_data entry & a reference
737  $newObj = parent::saveObject();
738 
739  // put here your object specific stuff
740 
741  // always send a message
742  ilUtil::sendSuccess($this->lng->txt("rolf_added"),true);
743 
744  $this->ctrl->redirect($this, "view");
745  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
+ Here is the call graph for this function:

◆ saveSettingsObject()

ilObjRoleFolderGUI::saveSettingsObject ( )

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

References $_POST, $ilErr, $ilUser, ilPrivacySettings\_getInstance(), ilSecuritySettings\_getInstance(), ilObjectGUI\checkPermissionBool(), editSettingsObject(), initSettingsForm(), and ilUtil\sendSuccess().

795  {
796  global $ilErr, $rbacreview, $ilUser;
797 
798  if (!$this->checkPermissionBool("write"))
799  {
800  $ilErr->raiseError($this->lng->txt('permission_denied'),$ilErr->MESSAGE);
801  }
802 
803  $form = $this->initSettingsForm();
804  if($form->checkInput())
805  {
806  include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
807  $privacy = ilPrivacySettings::_getInstance();
808  $privacy->enableRbacLog((int) $_POST['rbac_log']);
809  $privacy->setRbacLogAge((int) $_POST['rbac_log_age']);
810  $privacy->save();
811 
812  if($rbacreview->isAssigned($ilUser->getId(),SYSTEM_ROLE_ID))
813  {
814  include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
815  $security = ilSecuritySettings::_getInstance();
816  $security->protectedAdminRole((int) $_POST['admin_role']);
817  $security->save();
818  }
819 
820  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
821  $this->ctrl->redirect($this, "editSettings");
822  }
823 
824  $form->setValuesByPost();
825  $this->editSettingsObject($form);
826  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
editSettingsObject(ilPropertyFormGUI $a_form=null)
$_POST['username']
Definition: cron.php:12
global $ilUser
Definition: imgupload.php:15
static _getInstance()
Get instance of ilPrivacySettings.
static _getInstance()
Get instance of ilSecuritySettings.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
+ Here is the call graph for this function:

◆ showPossibleSubObjects()

ilObjRoleFolderGUI::showPossibleSubObjects (   $a_tpl)

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

public

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

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

671  {
672  global $rbacsystem;
673 
674  $d = $this->objDefinition->getCreatableSubObjects($this->object->getType());
675 
676  if ($this->object->getRefId() != ROLE_FOLDER_ID or !$rbacsystem->checkAccess('create_rolt',ROLE_FOLDER_ID))
677  {
678  unset($d["rolt"]);
679  }
680 
681  if (!$rbacsystem->checkAccess('create_role',$this->object->getRefId()))
682  {
683  unset($d["role"]);
684  }
685 
686  if (count($d) > 0)
687  {
688  foreach ($d as $row)
689  {
690  $count = 0;
691  if ($row["max"] > 0)
692  {
693  //how many elements are present?
694  for ($i=0; $i<count($this->data["ctrl"]); $i++)
695  {
696  if ($this->data["ctrl"][$i]["type"] == $row["name"])
697  {
698  $count++;
699  }
700  }
701  }
702  if ($row["max"] == "" || $count < $row["max"])
703  {
704  $subobj[] = $row["name"];
705  }
706  }
707  }
708 
709  if (is_array($subobj))
710  {
711  //build form
712  $opts = ilUtil::formSelect(12,"new_type",$subobj);
713  $a_tpl->setCurrentBlock("add_object");
714  $a_tpl->setVariable("SELECT_OBJTYPE", $opts);
715  $a_tpl->setVariable("BTN_NAME", "create");
716  $a_tpl->setVariable("TXT_ADD", $this->lng->txt("add"));
717  $a_tpl->parseCurrentBlock();
718  }
719 
720  return $a_tpl;
721  }
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.
+ Here is the call graph for this function:

◆ viewObject()

ilObjRoleFolderGUI::viewObject ( )

ilErrorHandler $ilErr ilRbacSystem $rbacsystem ilToolbarGUI $ilToolbar

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

References $ilErr.

Referenced by applyFilterObject(), and resetFilterObject().

97  {
98  global $ilErr, $rbacsystem, $ilToolbar,$rbacreview,$ilTabs;
99 
100  $ilTabs->activateTab('view');
101 
102  if(!$rbacsystem->checkAccess('visible,read',$this->object->getRefId()))
103  {
104  $ilErr->raiseError($this->lng->txt('permission_denied'),$ilErr->MESSAGE);
105  }
106 
107  $this->ctrl->setParameter($this,'new_type','role');
108  $ilToolbar->addButton(
109  $this->lng->txt('rolf_create_role'),
110  $this->ctrl->getLinkTarget($this,'create')
111  );
112 
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  $ilToolbar->addButton(
121  $this->lng->txt('rbac_import_role'),
122  $this->ctrl->getLinkTargetByClass('ilPermissionGUI','displayImportRoleForm')
123  );
124 
125  include_once './Services/AccessControl/classes/class.ilRoleTableGUI.php';
126  $table = new ilRoleTableGUI($this,'view');
127  $table->init();
128  $table->parse($this->object->getId());
129 
130  $this->tpl->setContent($table->getHTML());
131  }
TableGUI for the presentation og roles and role templates.
+ Here is the caller graph for this function:

Field Documentation

◆ $type

ilObjRoleFolderGUI::$type

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


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