ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 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 ($a_error=false)
 display deletion confirmation screen DEPRECATED !!! public More...
 
 adoptPermSaveObject ()
 ??? TODO: what is the purpose of this function? public More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) overwritten to prevent displaying of role templates in local role folders More...
 
 saveObject ()
 save object public More...
 
 getAdminTabs ()
 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
 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 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...
 

Data Fields

 $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 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 ()
 
 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...
 
 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...
 

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
 
 $rbacsystem
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Constructor public.

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

References ilObjectGUI\$lng.

52  {
53  global $lng;
54 
55  $this->type = "rolf";
56  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
57  $lng->loadLanguageModule('rbac');
58  }

Member Function Documentation

◆ addRolePermissionsObject()

ilObjRoleFolderGUI::addRolePermissionsObject ( )
protected

Add role permissions.

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

References $_POST, $form, $ilCtrl, $source, array, doAddRolePermissions(), initCopyBehaviourForm(), and ilUtil\sendSuccess().

326  {
327  global $ilCtrl;
328 
329  // Finally copy role/rolt
330  $roles = explode(',', $_POST['roles']);
331  $source = (int) $_REQUEST['copy_source'];
332 
333  $form = $this->initCopyBehaviourForm();
334  if ($form->checkInput()) {
335  foreach ((array) $roles as $role_id) {
336  if ($role_id != $source) {
337  $this->doAddRolePermissions($source, $role_id, $form->getInput('change_existing'));
338  }
339  }
340 
341  ilUtil::sendSuccess($this->lng->txt('rbac_copy_finished'), true);
342  $ilCtrl->redirect($this, 'view');
343  }
344  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $ilCtrl
Definition: ilias.php:18
if(isset($_POST['submit'])) $form
Create styles array
The data for the language used.
$source
Definition: linkback.php:22
$_POST["username"]
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 825 of file class.ilObjRoleFolderGUI.php.

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

826  {
827  switch ($a_form_id) {
829 
830  include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
831  $security = ilSecuritySettings::_getInstance();
832 
833  $fields = array('adm_adm_role_protect' => array($security->isAdminRoleProtected(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
834 
835  return array(array("editSettings", $fields));
836 
838 
839  include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
840  $privacy = ilPrivacySettings::_getInstance();
841 
842  $subitems = null;
843  if ((bool) $privacy->enabledRbacLog()) {
844  $subitems = array('rbac_log_age' => $privacy->getRbacLogAge());
845  }
846  $fields = array('rbac_log' => array($privacy->enabledRbacLog(), ilAdministrationSettingsFormHandler::VALUE_BOOL, $subitems));
847 
848  return array(array("editSettings", $fields));
849  }
850  }
Create styles array
The data for the language used.
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 626 of file class.ilObjRoleFolderGUI.php.

References ilUtil\sendSuccess().

627  {
628  ilUtil::sendSuccess($this->lng->txt("saved_successfully"), true);
629 
630  $this->ctrl->redirect($this, "view");
631  }
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 500 of file class.ilObjRoleFolderGUI.php.

References $table, and viewObject().

501  {
502  include_once './Services/AccessControl/classes/class.ilRoleTableGUI.php';
503  $table = new ilRoleTableGUI($this, 'view');
504  $table->init();
505  $table->resetOffset();
506  $table->writeFilterToSession();
507 
508  $this->viewObject();
509  }
TableGUI for the presentation og roles and role templates.
viewObject()
ilErrorHandler $ilErr ilRbacSystem $rbacsystem ilToolbarGUI $ilToolbar
if(empty($password)) $table
Definition: pwgen.php:24
+ Here is the call graph for this function:

◆ chooseCopyBehaviourObject()

ilObjRoleFolderGUI::chooseCopyBehaviourObject ( )
protected

Chosse change existing objects,...

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

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

245  {
246  global $ilCtrl, $ilTabs;
247 
248  $ilCtrl->saveParameter($this, 'copy_source', (int) $_REQUEST['copy_source']);
249  $ilTabs->clearTargets();
250  $ilTabs->setBackTarget(
251  $this->lng->txt('rbac_back_to_overview'),
252  $this->ctrl->getLinkTarget($this, 'roleSearchList')
253  );
254  $form = $this->initCopyBehaviourForm();
255  $this->tpl->setContent($form->getHTML());
256  }
global $ilCtrl
Definition: ilias.php:18
if(isset($_POST['submit'])) $form
initCopyBehaviourForm()
Show copy behaviour form.
+ Here is the call graph for this function:

◆ confirmDeleteObject()

ilObjRoleFolderGUI::confirmDeleteObject ( )
protected

Confirm deletion of roles.

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

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

529  {
530  global $ilCtrl;
531 
532  if (!count($_POST['roles'])) {
533  ilUtil::sendFailure($this->lng->txt('select_one'), true);
534  $ilCtrl->redirect($this, 'view');
535  }
536 
537  $question = $this->lng->txt('rbac_role_delete_qst');
538 
539  include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
540  $confirm = new ilConfirmationGUI();
541  $confirm->setHeaderText($question);
542  $confirm->setFormAction($ilCtrl->getFormAction($this));
543  $confirm->setHeaderText($this->lng->txt("info_delete_sure"));
544  $confirm->setConfirm($this->lng->txt('delete'), 'deleteRole');
545  $confirm->setCancel($this->lng->txt('cancel'), 'cancel');
546 
547 
548  include_once './Services/AccessControl/classes/class.ilObjRole.php';
549  foreach ($_POST['roles'] as $role_id) {
550  $confirm->addItem(
551  'roles[]',
552  $role_id,
554  );
555  }
556  $this->tpl->setContent($confirm->getHTML());
557  }
static _lookupTitle($a_id)
lookup object title
global $ilCtrl
Definition: ilias.php:18
static _getTranslation($a_role_title)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$_POST["username"]
Confirmation screen class.
+ Here is the call graph for this function:

◆ copyRoleObject()

ilObjRoleFolderGUI::copyRoleObject ( )
protected

Copy role.

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

References $_POST, $form, $ilCtrl, $source, array, doCopyRole(), initCopyBehaviourForm(), and ilUtil\sendSuccess().

302  {
303  global $ilCtrl;
304 
305  // Finally copy role/rolt
306  $roles = explode(',', $_POST['roles']);
307  $source = (int) $_REQUEST['copy_source'];
308 
309  $form = $this->initCopyBehaviourForm();
310  if ($form->checkInput()) {
311  foreach ((array) $roles as $role_id) {
312  if ($role_id != $source) {
313  $this->doCopyRole($source, $role_id, $form->getInput('change_existing'));
314  }
315  }
316 
317  ilUtil::sendSuccess($this->lng->txt('rbac_copy_finished'), true);
318  $ilCtrl->redirect($this, 'view');
319  }
320  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $ilCtrl
Definition: ilias.php:18
if(isset($_POST['submit'])) $form
doCopyRole($source, $target, $change_existing)
Perform copy of role ilTree $tree <type> $rbacadmin <type> $rbacreview.
Create styles array
The data for the language used.
$source
Definition: linkback.php:22
$_POST["username"]
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 599 of file class.ilObjRoleFolderGUI.php.

600  {
601  $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
602 
603  /*
604  $this->object->setTitle($this->lng->txt("obj_".$this->object->getType()."_local"));
605  $this->object->setDescription("obj_".$this->object->getType()."_local_desc");
606 
607  $this->saveObject();
608  */
609  }
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 !!! public

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

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

◆ deleteRoleObject()

ilObjRoleFolderGUI::deleteRoleObject ( )
protected

Delete roles.

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

References $_POST, $id, $ilCtrl, ilObjectGUI\$ilErr, ilObjectGUI\$rbacreview, ilObjectGUI\$rbacsystem, array, ilObjectFactory\getInstanceByObjId(), and ilUtil\sendSuccess().

563  {
565 
566  if (!$rbacsystem->checkAccess('delete', $this->object->getRefId())) {
567  $ilErr->raiseError(
568  $this->lng->txt('msg_no_perm_delete'),
569  $ilErr->MESSAGE
570  );
571  }
572 
573  foreach ((array) $_POST['roles'] as $id) {
574  // instatiate correct object class (role or rolt)
576 
577  if ($obj->getType() == "role") {
578  $rolf_arr = $rbacreview->getFoldersAssignedToRole($obj->getId(), true);
579  $obj->setParent($rolf_arr[0]);
580  }
581 
582  $obj->delete();
583  }
584 
585  // set correct return location if rolefolder is removed
586  ilUtil::sendSuccess($this->lng->txt("msg_deleted_roles_rolts"), true);
587  $ilCtrl->redirect($this, 'view');
588  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
if(!array_key_exists('StateId', $_REQUEST)) $id
global $ilCtrl
Definition: ilias.php:18
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Create styles array
The data for the language used.
$_POST["username"]
+ Here is the call graph for this function:

◆ doAddRolePermissions()

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

do add role permission

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

References ilObjectGUI\$rbacreview, $source, $target, doChangeExistingObjects(), and object.

Referenced by addRolePermissionsObject().

350  {
351  global $rbacadmin, $rbacreview;
352 
353  $rbacadmin->copyRolePermissionUnion(
354  $source,
355  $this->object->getRefId(),
356  $target,
357  $rbacreview->getRoleFolderOfRole($target),
358  $target,
359  $rbacreview->getRoleFolderOfRole($target)
360  );
361 
362  if ($change_existing) {
363  $target_obj = $rbacreview->getRoleFolderOfRole($target);
364  $this->doChangeExistingObjects($target_obj, $target);
365  }
366  }
doChangeExistingObjects($a_start_obj, $a_target_role)
Do change existing objects type $rbacreview.
Create new PHPExcel object
obj_idprivate
$source
Definition: linkback.php:22
+ 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 471 of file class.ilObjRoleFolderGUI.php.

References ilObjectGUI\$rbacreview, array, ilObjRole\MODE_PROTECTED_DELETE_LOCAL_POLICIES, and ilObjRole\MODE_UNPROTECTED_DELETE_LOCAL_POLICIES.

Referenced by doAddRolePermissions(), and doRemoveRolePermissions().

472  {
473  global $rbacreview;
474 
475  if (!$a_start_obj) {
476  // todo error handling
477  }
478 
479  include_once './Services/AccessControl/classes/class.ilObjRole.php';
480  if ($rbacreview->isProtected($this->object->getRefId(), $a_source_role)) {
482  } else {
484  }
485 
486  if ($a_start_obj) {
487  $role = new ilObjRole($a_target_role);
488  $role->changeExistingObjects(
489  $a_start_obj,
490  $mode,
491  array('all')
492  );
493  }
494  }
Class ilObjRole.
const MODE_PROTECTED_DELETE_LOCAL_POLICIES
Create styles array
The data for the language used.
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 428 of file class.ilObjRoleFolderGUI.php.

References ilObjectGUI\$rbacreview, $source, $target, ilObjectGUI\$tree, array, ilObjRole\MODE_PROTECTED_DELETE_LOCAL_POLICIES, ilObjRole\MODE_UNPROTECTED_DELETE_LOCAL_POLICIES, and object.

Referenced by copyRoleObject().

429  {
430  global $tree, $rbacadmin, $rbacreview;
431 
432  $target_obj = $rbacreview->getRoleFolderOfRole($target);
433 
434  // Copy role template permissions
435  $rbacadmin->copyRoleTemplatePermissions(
436  $source,
437  $this->object->getRefId(),
438  $target_obj,
439  $target
440  );
441 
442  if (!$change_existing || !$target_obj) {
443  return true;
444  }
445 
446  $start = $target_obj;
447 
448  include_once './Services/AccessControl/classes/class.ilObjRole.php';
449  if ($rbacreview->isProtected($this->object->getRefId(), $source)) {
451  } else {
453  }
454 
455  if ($start) {
456  $role = new ilObjRole($target);
457  $role->changeExistingObjects(
458  $start,
459  $mode,
460  array('all')
461  );
462  }
463  }
Class ilObjRole.
const MODE_PROTECTED_DELETE_LOCAL_POLICIES
Create styles array
The data for the language used.
const MODE_UNPROTECTED_DELETE_LOCAL_POLICIES
Create new PHPExcel object
obj_idprivate
$source
Definition: linkback.php:22
+ Here is the caller graph for this function:

◆ doRemoveRolePermissions()

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

do add role permission

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

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

Referenced by removeRolePermissionsObject().

396  {
397  global $rbacadmin, $rbacreview;
398 
399  ilLoggerFactory::getLogger('ac')->debug('Remove permission source: ' . $source);
400  ilLoggerFactory::getLogger('ac')->debug('Remove permission target: ' . $target);
401  ilLoggerFactory::getLogger('ac')->debug('Remove permission change existing: ' . $change_existing);
402 
403  $rbacadmin->copyRolePermissionSubtract(
404  $source,
405  $this->object->getRefId(),
406  $target,
407  $rbacreview->getRoleFolderOfRole($target)
408  );
409 
410  if ($change_existing) {
411  $target_obj = $rbacreview->getRoleFolderOfRole($target);
412  $this->doChangeExistingObjects($target_obj, $target);
413  }
414  }
doChangeExistingObjects($a_start_obj, $a_target_role)
Do change existing objects type $rbacreview.
Create new PHPExcel object
obj_idprivate
static getLogger($a_component_id)
Get component logger.
$source
Definition: linkback.php:22
+ 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 742 of file class.ilObjRoleFolderGUI.php.

References initSettingsForm().

Referenced by saveSettingsObject().

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

◆ getAdminTabs()

ilObjRoleFolderGUI::getAdminTabs ( )

Add role folder tabs ilTree $tree ilLanguage $lng.

Parameters
ilTabsGUI$tabs_gui

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

References array, and ilObjectGUI\checkPermissionBool().

712  {
713  if ($this->checkPermissionBool("visible,read")) {
714  $this->tabs_gui->addTarget(
715  "view",
716  $this->ctrl->getLinkTarget($this, "view"),
717  array("", "view"),
718  get_class($this)
719  );
720 
721  $this->tabs_gui->addTarget(
722  "settings",
723  $this->ctrl->getLinkTarget($this, "editSettings"),
724  array("editSettings"),
725  get_class($this)
726  );
727  }
728 
729  if ($this->checkPermissionBool("edit_permission")) {
730  $this->tabs_gui->addTarget(
731  "perm_settings",
732  $this->ctrl->getLinkTargetByClass(
733  array(get_class($this),'ilpermissiongui'),
734  "perm"
735  ),
736  "",
737  "ilpermissiongui"
738  );
739  }
740  }
Create styles array
The data for the language used.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
+ Here is the call graph for this function:

◆ initCopyBehaviourForm()

ilObjRoleFolderGUI::initCopyBehaviourForm ( )
protected

Show copy behaviour form.

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

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

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

262  {
263  global $ilCtrl;
264 
265  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
266  $form = new ilPropertyFormGUI();
267  $form->setTitle($this->lng->txt('rbac_copy_behaviour'));
268  $form->setFormAction($ilCtrl->getFormAction($this, 'chooseCopyBehaviour'));
269 
270  $ce = new ilRadioGroupInputGUI($this->lng->txt('change_existing_objects'), 'change_existing');
271  $ce->setRequired(true);
272  $ce->setValue(1);
273  $form->addItem($ce);
274 
275  $ceo = new ilRadioOption($this->lng->txt('change_existing_objects'), 1);
276  $ce->addOption($ceo);
277 
278  $cne = new ilRadioOption($this->lng->txt('rbac_not_change_existing_objects'), 0);
279  $ce->addOption($cne);
280 
281  $roles = new ilHiddenInputGUI('roles');
282  $roles->setValue(implode(',', (array) $_POST['roles']));
283  $form->addItem($roles);
284 
285 
286  // if source is role template show option add permission, remove permissions and copy permissions
287  if (ilObject::_lookupType((int) $_REQUEST['copy_source']) == 'rolt') {
288  $form->addCommandButton('addRolePermissions', $this->lng->txt('rbac_copy_role_add_perm'));
289  $form->addCommandButton('removeRolePermissions', $this->lng->txt('rbac_copy_role_remove_perm'));
290  $form->addCommandButton('copyRole', $this->lng->txt('rbac_copy_role_copy'));
291  } else {
292  $form->addCommandButton('copyRole', $this->lng->txt('rbac_copy_role'));
293  }
294  return $form;
295  }
This class represents an option in a radio group.
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.
if(isset($_POST['submit'])) $form
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
$_POST["username"]
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 166 of file class.ilObjRoleFolderGUI.php.

References $form, $ilCtrl, and ilFormPropertyGUI\setRequired().

Referenced by roleSearchFormObject(), and roleSearchObject().

167  {
168  global $ilCtrl;
169 
170  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
171  $form = new ilPropertyFormGUI();
172  $form->setTitle($this->lng->txt('rbac_role_title'));
173  $form->setFormAction($ilCtrl->getFormAction($this, 'view'));
174 
175  $search = new ilTextInputGUI($this->lng->txt('title'), 'title');
176  $search->setRequired(true);
177  $search->setSize(30);
178  $search->setMaxLength(255);
179  $form->addItem($search);
180 
181  $form->addCommandButton('roleSearchForm', $this->lng->txt('search'));
182  return $form;
183  }
This class represents a property form user interface.
global $ilCtrl
Definition: ilias.php:18
if(isset($_POST['submit'])) $form
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 782 of file class.ilObjRoleFolderGUI.php.

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

Referenced by editSettingsObject(), and saveSettingsObject().

783  {
784  global $rbacreview, $ilUser;
785 
786  $this->lng->loadLanguageModule('ps');
787 
788  include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
789  include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
790  $privacy = ilPrivacySettings::_getInstance();
791  $security = ilSecuritySettings::_getInstance();
792 
793  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
794  $form = new ilPropertyFormGUI();
795  $form->setFormAction($this->ctrl->getFormAction($this, "saveSettings"));
796  $form->setTitle($this->lng->txt('settings'));
797 
798  // protected admin
799  $admin = new ilCheckboxInputGUI($GLOBALS['lng']->txt('adm_adm_role_protect'), 'admin_role');
800  $admin->setDisabled(!$rbacreview->isAssigned($ilUser->getId(), SYSTEM_ROLE_ID));
801  $admin->setInfo($this->lng->txt('adm_adm_role_protect_info'));
802  $admin->setChecked((int) $security->isAdminRoleProtected());
803  $admin->setValue(1);
804  $form->addItem($admin);
805 
806  $check = new ilCheckboxInputGui($this->lng->txt('rbac_log'), 'rbac_log');
807  $check->setInfo($this->lng->txt('rbac_log_info'));
808  $check->setChecked($privacy->enabledRbacLog());
809  $form->addItem($check);
810 
811  $age = new ilNumberInputGUI($this->lng->txt('rbac_log_age'), 'rbac_log_age');
812  $age->setInfo($this->lng->txt('rbac_log_age_info'));
813  $age->setValue($privacy->getRbacLogAge());
814  $age->setMinValue(1);
815  $age->setMaxValue(24);
816  $age->setSize(2);
817  $age->setMaxLength(2);
818  $check->addSubItem($age);
819 
820  $form->addCommandButton('saveSettings', $this->lng->txt('save'));
821 
822  return $form;
823  }
This class represents a property form user interface.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
This class represents a checkbox property in a property form.
setInfo($a_info)
Set Information Text.
if(isset($_POST['submit'])) $form
This class represents a number property in a property form.
$ilUser
Definition: imgupload.php:18
static _getInstance()
Get instance of ilPrivacySettings.
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 371 of file class.ilObjRoleFolderGUI.php.

References $_POST, $form, $ilCtrl, $source, array, doRemoveRolePermissions(), initCopyBehaviourForm(), and ilUtil\sendSuccess().

372  {
373  global $ilCtrl;
374 
375  // Finally copy role/rolt
376  $roles = explode(',', $_POST['roles']);
377  $source = (int) $_REQUEST['copy_source'];
378 
379  $form = $this->initCopyBehaviourForm();
380  if ($form->checkInput()) {
381  foreach ((array) $roles as $role_id) {
382  if ($role_id != $source) {
383  $this->doRemoveRolePermissions($source, $role_id, $form->getInput('change_existing'));
384  }
385  }
386 
387  ilUtil::sendSuccess($this->lng->txt('rbac_copy_finished'), true);
388  $ilCtrl->redirect($this, 'view');
389  }
390  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $ilCtrl
Definition: ilias.php:18
if(isset($_POST['submit'])) $form
Create styles array
The data for the language used.
$source
Definition: linkback.php:22
$_POST["username"]
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 514 of file class.ilObjRoleFolderGUI.php.

References $table, and viewObject().

515  {
516  include_once './Services/AccessControl/classes/class.ilRoleTableGUI.php';
517  $table = new ilRoleTableGUI($this, 'view');
518  $table->init();
519  $table->resetOffset();
520  $table->resetFilter();
521 
522  $this->viewObject();
523  }
TableGUI for the presentation og roles and role templates.
viewObject()
ilErrorHandler $ilErr ilRbacSystem $rbacsystem ilToolbarGUI $ilToolbar
if(empty($password)) $table
Definition: pwgen.php:24
+ Here is the call graph for this function:

◆ roleSearchFormObject()

ilObjRoleFolderGUI::roleSearchFormObject ( )
protected

Parse search query type $ilCtrl.

Returns
type

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

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

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

◆ roleSearchListObject()

ilObjRoleFolderGUI::roleSearchListObject ( )
protected

List roles.

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

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

Referenced by roleSearchFormObject().

213  {
214  global $ilTabs, $ilCtrl;
215 
216  $ilTabs->clearTargets();
217  $ilTabs->setBackTarget(
218  $this->lng->txt('rbac_back_to_overview'),
219  $this->ctrl->getLinkTarget($this, 'roleSearchList')
220  );
221 
222  $ilCtrl->setParameter($this, 'copy_source', (int) $_REQUEST['copy_source']);
223 
224  if (strlen($_SESSION['rolf_search_query'])) {
225  ilUtil::sendInfo($this->lng->txt('rbac_select_copy_targets'));
226 
227  include_once './Services/AccessControl/classes/class.ilRoleTableGUI.php';
228  $table = new ilRoleTableGUI($this, 'roleSearchList');
230  $table->setRoleTitleFilter($_SESSION['rolf_search_query']);
231  $table->init();
232  $table->parse($this->object->getId());
233  return $this->tpl->setContent($table->getHTML());
234  }
235 
236  ilUtil::sendFailure($this->lng->txt('msg_no_search_string'), true);
237  $ilCtrl->redirect($this, 'roleSearch');
238  }
$_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.
Create new PHPExcel object
obj_idprivate
if(empty($password)) $table
Definition: pwgen.php:24
+ 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 142 of file class.ilObjRoleFolderGUI.php.

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

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

◆ saveObject()

ilObjRoleFolderGUI::saveObject ( )

save object public

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

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

686  {
687  global $rbacadmin;
688 
689  // role folders are created automatically
690  $_GET["new_type"] = $this->object->getType();
691  $_POST["Fobject"]["title"] = $this->object->getTitle();
692  $_POST["Fobject"]["desc"] = $this->object->getDescription();
693 
694  // always call parent method first to create an object_data entry & a reference
695  $newObj = parent::saveObject();
696 
697  // put here your object specific stuff
698 
699  // always send a message
700  ilUtil::sendSuccess($this->lng->txt("rolf_added"), true);
701 
702  $this->ctrl->redirect($this, "view");
703  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_GET["client_id"]
$_POST["username"]
+ Here is the call graph for this function:

◆ saveSettingsObject()

ilObjRoleFolderGUI::saveSettingsObject ( )

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

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

752  {
753  global $ilErr, $rbacreview, $ilUser;
754 
755  if (!$this->checkPermissionBool("write")) {
756  $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->MESSAGE);
757  }
758 
759  $form = $this->initSettingsForm();
760  if ($form->checkInput()) {
761  include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
762  $privacy = ilPrivacySettings::_getInstance();
763  $privacy->enableRbacLog((int) $_POST['rbac_log']);
764  $privacy->setRbacLogAge((int) $_POST['rbac_log_age']);
765  $privacy->save();
766 
767  if ($rbacreview->isAssigned($ilUser->getId(), SYSTEM_ROLE_ID)) {
768  include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
769  $security = ilSecuritySettings::_getInstance();
770  $security->protectedAdminRole((int) $_POST['admin_role']);
771  $security->save();
772  }
773 
774  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
775  $this->ctrl->redirect($this, "editSettings");
776  }
777 
778  $form->setValuesByPost();
779  $this->editSettingsObject($form);
780  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
editSettingsObject(ilPropertyFormGUI $a_form=null)
if(isset($_POST['submit'])) $form
$ilUser
Definition: imgupload.php:18
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.
$_POST["username"]
+ 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

public

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

References $d, $i, ilObjectGUI\$rbacsystem, $row, data, ilUtil\formSelect(), and object.

640  {
641  global $rbacsystem;
642 
643  $d = $this->objDefinition->getCreatableSubObjects($this->object->getType());
644 
645  if ($this->object->getRefId() != ROLE_FOLDER_ID or !$rbacsystem->checkAccess('create_rolt', ROLE_FOLDER_ID)) {
646  unset($d["rolt"]);
647  }
648 
649  if (!$rbacsystem->checkAccess('create_role', $this->object->getRefId())) {
650  unset($d["role"]);
651  }
652 
653  if (count($d) > 0) {
654  foreach ($d as $row) {
655  $count = 0;
656  if ($row["max"] > 0) {
657  //how many elements are present?
658  for ($i=0; $i<count($this->data["ctrl"]); $i++) {
659  if ($this->data["ctrl"][$i]["type"] == $row["name"]) {
660  $count++;
661  }
662  }
663  }
664  if ($row["max"] == "" || $count < $row["max"]) {
665  $subobj[] = $row["name"];
666  }
667  }
668  }
669 
670  if (is_array($subobj)) {
671  //build form
672  $opts = ilUtil::formSelect(12, "new_type", $subobj);
673  $this->tpl->setCurrentBlock("add_object");
674  $this->tpl->setVariable("SELECT_OBJTYPE", $opts);
675  $this->tpl->setVariable("BTN_NAME", "create");
676  $this->tpl->setVariable("TXT_ADD", $this->lng->txt("add"));
677  $this->tpl->parseCurrentBlock();
678  }
679  }
Add some data
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.
Create new PHPExcel object
obj_idprivate
$i
Definition: disco.tpl.php:19
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
Definition: date.php:296
+ Here is the call graph for this function:

◆ viewObject()

ilObjRoleFolderGUI::viewObject ( )

ilErrorHandler $ilErr ilRbacSystem $rbacsystem ilToolbarGUI $ilToolbar

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

References ilObjectGUI\$ilErr, ilObjectGUI\$rbacreview, ilObjectGUI\$rbacsystem, $table, and object.

Referenced by applyFilterObject(), and resetFilterObject().

95  {
96  global $ilErr, $rbacsystem, $ilToolbar,$rbacreview,$ilTabs;
97 
98  $ilTabs->activateTab('view');
99 
100  if (!$rbacsystem->checkAccess('visible,read', $this->object->getRefId())) {
101  $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->MESSAGE);
102  }
103 
104 
105  if ($rbacsystem->checkAccess('create_role', $this->object->getRefId())) {
106  $this->ctrl->setParameter($this, 'new_type', 'role');
107  $ilToolbar->addButton(
108  $this->lng->txt('rolf_create_role'),
109  $this->ctrl->getLinkTarget($this, 'create')
110  );
111  }
112  if ($rbacsystem->checkAccess('create_rolt', $this->object->getRefId())) {
113  $this->ctrl->setParameter($this, 'new_type', 'rolt');
114  $ilToolbar->addButton(
115  $this->lng->txt('rolf_create_rolt'),
116  $this->ctrl->getLinkTarget($this, 'create')
117  );
118  $this->ctrl->clearParameters($this);
119  }
120 
121  if (
122  $rbacsystem->checkAccess('create_rolt', $this->object->getRefId()) ||
123  $rbacsystem->checkAccess('create_rolt', $this->object->getRefId())
124  ) {
125  $ilToolbar->addButton(
126  $this->lng->txt('rbac_import_role'),
127  $this->ctrl->getLinkTargetByClass('ilPermissionGUI', 'displayImportRoleForm')
128  );
129  }
130 
131  include_once './Services/AccessControl/classes/class.ilRoleTableGUI.php';
132  $table = new ilRoleTableGUI($this, 'view');
133  $table->init();
134  $table->parse($this->object->getId());
135 
136  $this->tpl->setContent($table->getHTML());
137  }
TableGUI for the presentation og roles and role templates.
Create new PHPExcel object
obj_idprivate
if(empty($password)) $table
Definition: pwgen.php:24
+ 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: