ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjRoleGUI Class Reference

Class ilObjRoleGUI. More...

+ Inheritance diagram for ilObjRoleGUI:
+ Collaboration diagram for ilObjRoleGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference=false, $a_prepare_output=true)
 Constructor public.
executeCommand ()
 execute command
 getParentRefId ()
 Get ref id of current object (not role folder id)
 getParentObjId ()
 Get obj_id of current object.
 getParentType ()
 get type of current object (not role folder)
 setBackTarget ($a_text, $a_link)
 set back tab target
 getBackTarget ()
 getAdminTabs (&$tabs_gui)
 admin and normal tabs are equal for roles
 listDesktopItemsObject ()
 askDeleteDesktopItemObject ()
 deleteDesktopItemsObject ()
 selectDesktopItemObject ()
 assignDesktopItemObject ()
 createObject ()
 Only called from administration -> role folder ? Otherwise this check access is wrong.
 editObject ()
 Edit role properties.
 saveObject ()
 Save new role.
 updateObject ()
 Save role settings.
 permSaveObject ($a_show_admin_permissions=false)
 save permissions
 adoptPermSaveObject ()
 copy permissions from role
 assignSaveObject ()
 wrapper for renamed function
 addUserObject ($a_user_ids)
 Assign user (callback from ilRepositorySearchGUI)
 deassignUserObject ()
 de-assign users from role
 userassignmentObject ()
 display user assignment panel
 cancelObject ()
 cancelObject is called when an operation is canceled, method links back public
 listUsersRoleObject ()
 __formatPath ($a_path_arr)
 __prepareOutput ()
 __setHeader ()
 __setLocator ()
 addAdminLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 getTabs (&$tabs_gui)
 get tabs abstract method.
 mailToRoleObject ()
 checkAccess ($a_perm_global, $a_perm_obj= '')
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not)
 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
 getCreationMode ()
 get creation mode
 getHTML ()
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled
 cancelDeleteObject ()
 cancel deletion of object
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 cancelCreation ()
 cancel create action and go back to repository parent
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 isVisible ($a_ref_id, $a_type)
 viewObject ()
 list childs of current object
 deleteObject ($a_error=false)
 Display deletion confirmation screen.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.

Data Fields

const MODE_GLOBAL_UPDATE = 1
const MODE_GLOBAL_CREATE = 2
const MODE_LOCAL_UPDATE = 3
const MODE_LOCAL_CREATE = 4
 $type
 $rolf_ref_id
 $ctrl
- 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

 getContainerType ()
 Get type of role container.
 showDefaultPermissionSettings ()
 check if default permissions are shown or not
 initFormRoleProperties ($a_mode)
 Create role prperty form.
 loadRoleProperties (ilObjRole $role)
 Store form input in role object.
 readRoleProperties (ilObjRole $role)
 Read role properties and write them to form.
 checkDuplicate ($a_role_id=0)
 Check if role with same name already exists in this folder.
 permObject ($a_show_admin_permissions=false)
 Show template permissions.
 adminPermObject ()
 Show administration permissions.
 adminPermSaveObject ()
 Save admin permissions.
 adoptPermObject ()
 confirmDeleteRoleObject ()
 Show delete confirmation screen.
 performDeleteRoleObject ()
 Delete role.
 isChangeExistingObjectsConfirmationRequired ()
 Check if a confirmation about further settings is required or not.
 showChangeExistingObjectsConfirmation ()
 Show confirmation screen.
 changeExistingObjectsObject ()
 Change existing objects.
 setSubTabs ($a_tab)
 Set sub tabs.
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu.
 insertHeaderAction ($a_list_gui)
 Insert header action into main template.
 addHeaderAction ()
 Add header action menu.
 redrawHeaderActionObject ()
 Ajax call: redraw action header only.
 setTabs ()
 set admin tabs public
 setAdminTabs ()
 set admin tabs public
 setLocator ()
 set Locator
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 omitLocator ($a_omit=true)
 initCreationForms ($a_new_type)
 Init creation froms.
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion)
 initCreateForm ($a_new_type)
 Init object creation form.
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types.
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates.
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen.
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position.
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook.
 initEditForm ()
 Init object edit form.
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form.
 getEditFormValues ()
 Get values for edit form.
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields.
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object.
 afterUpdate ()
 Post (successful) object update hook.
 initImportForm ($a_new_type)
 Init object import form.
 importFileObject ($parent_id=null)
 Import.
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook.
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g.
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste
 __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
 __showClipboardTable ($a_result_set, $a_from="")
 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
 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.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error.
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission.

Protected Attributes

 $obj_ref_id = 0
 $obj_obj_id = 0
 $obj_obj_type = ''
 $container_type = ''

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root.
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root.

Detailed Description

Class ilObjRoleGUI.

Author
Stefan Meyer <smeyer.de>
Sascha Hofmann sasch.nosp@m.ahof.nosp@m.mann@.nosp@m.gmx..nosp@m.de
Version
$Id$

ilObjRoleGUI: ilRepositorySearchGUI, ilExportGUI

Definition at line 19 of file class.ilObjRoleGUI.php.

Constructor & Destructor Documentation

ilObjRoleGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference = false,
  $a_prepare_output = true 
)

Constructor public.

Definition at line 52 of file class.ilObjRoleGUI.php.

References $_GET, ilObjectGUI\$lng, ilObjectGUI\$tree, ilObject\_lookupObjId(), ilObject\_lookupType(), getParentObjId(), getParentRefId(), and ilObjectGUI\ilObjectGUI().

{
global $tree,$lng;
$lng->loadLanguageModule('rbac');
//TODO: move this to class.ilias.php
define("USER_FOLDER_ID",7);
if($_GET['rolf_ref_id'] != '')
{
$this->rolf_ref_id = $_GET['rolf_ref_id'];
}
else
{
$this->rolf_ref_id = $_GET['ref_id'];
}
// Add ref_id of object that contains this role folder
$this->obj_ref_id = $tree->getParentId($this->rolf_ref_id);
$this->obj_obj_id = ilObject::_lookupObjId($this->getParentRefId());
$this->obj_obj_type = ilObject::_lookupType($this->getParentObjId());
$this->container_type = ilObject::_lookupType(ilObject::_lookupObjId($this->obj_ref_id));
$this->type = "role";
$this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,false);
$this->ctrl->saveParameter($this, array("obj_id", "rolf_ref_id"));
}

+ Here is the call graph for this function:

Member Function Documentation

ilObjRoleGUI::__formatPath (   $a_path_arr)

Definition at line 1468 of file class.ilObjRoleGUI.php.

References ilObjectGUI\$data, and $path.

Referenced by listDesktopItemsObject().

{
$counter = 0;
foreach ($a_path_arr as $data)
{
if ($counter++)
{
$path .= " -> ";
}
$path .= $data['title'];
}
if (strlen($path) > 50)
{
return '...'.substr($path,-50);
}
return $path;
}

+ Here is the caller graph for this function:

ilObjRoleGUI::__prepareOutput ( )

Definition at line 1490 of file class.ilObjRoleGUI.php.

References __setHeader(), ilUtil\infoPanel(), and ilUtil\sendInfo().

{
// output objects
$this->tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
$this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
// output locator
//$this->__setLocator();
// output message
if ($this->message)
{
ilUtil::sendInfo($this->message);
}
// display infopanel if something happened
// set header
$this->__setHeader();
}

+ Here is the call graph for this function:

ilObjRoleGUI::__setHeader ( )

Definition at line 1512 of file class.ilObjRoleGUI.php.

References ilUtil\getImagePath(), and getTabs().

Referenced by __prepareOutput().

{
$this->tpl->setTitle($this->lng->txt('role'));
$this->tpl->setDescription($this->object->getTitle());
$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_role.png"));
$this->getTabs($this->tabs_gui);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjRoleGUI::__setLocator ( )

Definition at line 1521 of file class.ilObjRoleGUI.php.

References $_GET, $ilCtrl, $row, and ilObjectGUI\$tree.

{
global $tree, $ilCtrl;
return;
$this->tpl->addBlockFile("LOCATOR", "locator", "tpl.locator.html", "Services/Locator");
$counter = 0;
foreach ($tree->getPathFull($this->rolf_ref_id) as $key => $row)
{
if ($counter++)
{
$this->tpl->touchBlock('locator_separator_prefix');
}
$this->tpl->setCurrentBlock("locator_item");
if ($row["type"] == 'rolf')
{
$this->tpl->setVariable("ITEM",$this->object->getTitle());
$this->tpl->setVariable("LINK_ITEM",$this->ctrl->getLinkTarget($this));
}
elseif ($row["child"] != $tree->getRootId())
{
$ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $row["child"]);
$this->tpl->setVariable("ITEM", $row["title"]);
$this->tpl->setVariable("LINK_ITEM",
$ilCtrl->getLinkTargetByClass("ilrepositorygui", ""));
}
else
{
$ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $row["child"]);
$this->tpl->setVariable("ITEM", $this->lng->txt("repository"));
$this->tpl->setVariable("LINK_ITEM",
$ilCtrl->getLinkTargetByClass("ilrepositorygui", ""));
}
$ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setVariable("TXT_LOCATOR",$this->lng->txt("locator"));
$this->tpl->parseCurrentBlock();
}
ilObjRoleGUI::addAdminLocatorItems ( )

should be overwritten to add object specific items (repository items are preloaded)

Reimplemented from ilObjectGUI.

Definition at line 1572 of file class.ilObjRoleGUI.php.

References $_GET, ilFrameTargetInfo\_getFrame(), and ilObject\_lookupObjId().

{
global $ilLocator;
if ($_GET["admin_mode"] == "settings"
&& $_GET["ref_id"] == ROLE_FOLDER_ID) // system settings
{
$ilLocator->addItem($this->lng->txt("administration"),
$this->ctrl->getLinkTargetByClass("iladministrationgui", "frameset"),
$ilLocator->addItem($this->lng->txt("obj_".ilObject::_lookupType(
$this->ctrl->getLinkTargetByClass("ilobjrolefoldergui", "view"));
if ($_GET["obj_id"] > 0)
{
$ilLocator->addItem($this->object->getTitle(),
$this->ctrl->getLinkTarget($this, "view"));
}
}
else // repository administration
{
// ?
}
}

+ Here is the call graph for this function:

ilObjRoleGUI::addUserObject (   $a_user_ids)

Assign user (callback from ilRepositorySearchGUI)

Parameters
array$a_user_idsArray of user ids
Returns

Definition at line 1192 of file class.ilObjRoleGUI.php.

References $GLOBALS, $rolf_ref_id, checkAccess(), ilUtil\sendFailure(), ilUtil\sendInfo(), and ilUtil\sendSuccess().

{
global $rbacreview,$rbacadmin;
if(!$this->checkAccess('edit_userassignment','edit_permission'))
{
ilUtil::sendFailure($this->lng->txt('msg_no_perm_assign_user_to_role'),true);
return false;
}
if(!$rbacreview->isAssignable($this->object->getId(),$this->rolf_ref_id) &&
$this->rolf_ref_id != ROLE_FOLDER_ID)
{
ilUtil::sendFailure($this->lng->txt('err_role_not_assignable'),true);
return false;
}
if(!$a_user_ids)
{
$GLOBALS['lng']->loadLanguageModule('search');
ilUtil::sendFailure($this->lng->txt('search_err_user_not_exist'),true);
return false;
}
$assigned_users_all = $rbacreview->assignedUsers($this->object->getId());
// users to assign
$assigned_users_new = array_diff($a_user_ids,array_intersect($a_user_ids,$assigned_users_all));
// selected users all already assigned. stop
if (count($assigned_users_new) == 0)
{
ilUtil::sendInfo($this->lng->txt("rbac_msg_user_already_assigned"),true);
$this->ctrl->redirect($this,'userassignment');
}
// assign new users
foreach ($assigned_users_new as $user)
{
$rbacadmin->assignUser($this->object->getId(),$user,false);
}
// update object data entry (to update last modification date)
$this->object->update();
ilUtil::sendSuccess($this->lng->txt("msg_userassignment_changed"),true);
$this->ctrl->redirect($this,'userassignment');
}

+ Here is the call graph for this function:

ilObjRoleGUI::adminPermObject ( )
protected

Show administration permissions.

Returns

Definition at line 835 of file class.ilObjRoleGUI.php.

References permObject().

{
return $this->permObject(true);
}

+ Here is the call graph for this function:

ilObjRoleGUI::adminPermSaveObject ( )
protected

Save admin permissions.

Returns

Definition at line 844 of file class.ilObjRoleGUI.php.

References permSaveObject().

{
return $this->permSaveObject(true);
}

+ Here is the call graph for this function:

ilObjRoleGUI::adoptPermObject ( )
protected

Definition at line 849 of file class.ilObjRoleGUI.php.

References ilObjectGUI\$tpl, ilObjRole\_getTranslation(), ilUtil\_sortIds(), and ilUtil\formRadioButton().

Referenced by adoptPermSaveObject().

{
global $rbacreview;
$output = array();
$parent_role_ids = $rbacreview->getParentRoleIds($this->rolf_ref_id,true);
$ids = array();
foreach($parent_role_ids as $id => $tmp)
{
$ids[] = $id;
}
// Sort ids
$sorted_ids = ilUtil::_sortIds($ids,'object_data','type,title','obj_id');
$key = 0;
foreach($sorted_ids as $id)
{
$par = $parent_role_ids[$id];
if ($par["obj_id"] != SYSTEM_ROLE_ID && $this->object->getId() != $par["obj_id"])
{
$radio = ilUtil::formRadioButton(0,"adopt",$par["obj_id"]);
$output["adopt"][$key]["css_row_adopt"] = ($key % 2 == 0) ? "tblrow1" : "tblrow2";
$output["adopt"][$key]["check_adopt"] = $radio;
$output["adopt"][$key]["role_id"] = $par["obj_id"];
$output["adopt"][$key]["type"] = ($par["type"] == 'role' ? $this->lng->txt('obj_role') : $this->lng->txt('obj_rolt'));
$output["adopt"][$key]["role_name"] = ilObjRole::_getTranslation($par["title"]);
$output["adopt"][$key]["role_desc"] = $par["desc"];
$key++;
}
}
$output["formaction_adopt"] = $this->ctrl->getFormAction($this);
$output["message_middle"] = $this->lng->txt("adopt_perm_from_template");
$tpl = new ilTemplate("tpl.adm_copy_role.html", true, true, "Services/AccessControl");
$tpl->setCurrentBlock("ADOPT_PERM_ROW");
foreach ($output["adopt"] as $key => $value)
{
$tpl->setVariable("CSS_ROW_ADOPT",$value["css_row_adopt"]);
$tpl->setVariable("CHECK_ADOPT",$value["check_adopt"]);
$tpl->setVariable("LABEL_ID",$value["role_id"]);
$tpl->setVariable("TYPE",$value["type"]);
$tpl->setVariable("ROLE_NAME",$value["role_name"]);
if(strlen($value['role_desc']))
{
$tpl->setVariable('ROLE_DESC',$value['role_desc']);
}
$tpl->parseCurrentBlock();
}
$tpl->setVariable("TPLPATH",$this->tpl->tplPath);
$tpl->setVariable("MESSAGE_MIDDLE",$output["message_middle"]);
$tpl->setVariable("FORMACTION_ADOPT",$output["formaction_adopt"]);
$tpl->setVariable("ADOPT",$this->lng->txt('copy'));
$tpl->setVariable("CANCEL",$this->lng->txt('cancel'));
$tpl->setVariable('HEAD_ROLE',$this->lng->txt('title'));
$tpl->setVariable('HEAD_TYPE',$this->lng->txt('type'));
$this->tpl->setContent($tpl->get());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjRoleGUI::adoptPermSaveObject ( )

copy permissions from role

public

Definition at line 1131 of file class.ilObjRoleGUI.php.

References $_POST, $rolf_ref_id, ilObjectGUI\$tree, adoptPermObject(), checkAccess(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $rbacadmin, $rbacsystem, $rbacreview, $tree;
if(!$_POST['adopt'])
{
ilUtil::sendFailure($this->lng->txt('select_one'));
$this->adoptPermObject();
return false;
}
$access = $this->checkAccess('visible,write','edit_permission');
if (!$access)
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_perm"),$this->ilias->error_obj->MESSAGE);
}
if ($this->object->getId() == $_POST["adopt"])
{
ilUtil::sendFailure($this->lng->txt("msg_perm_adopted_from_itself"),true);
}
else
{
$rbacadmin->deleteRolePermission($this->object->getId(), $this->rolf_ref_id);
$parentRoles = $rbacreview->getParentRoleIds($this->rolf_ref_id,true);
$rbacadmin->copyRoleTemplatePermissions(
$_POST["adopt"],
$parentRoles[$_POST["adopt"]]["parent"],
$this->rolf_ref_id,
$this->object->getId(),
false);
// update object data entry (to update last modification date)
$this->object->update();
// send info
$obj_data =& $this->ilias->obj_factory->getInstanceByObjId($_POST["adopt"]);
ilUtil::sendSuccess($this->lng->txt("msg_perm_adopted_from1")." '".$obj_data->getTitle()."'.<br/>".
$this->lng->txt("msg_perm_adopted_from2"),true);
}
$this->ctrl->redirect($this, "perm");
}

+ Here is the call graph for this function:

ilObjRoleGUI::askDeleteDesktopItemObject ( )

Definition at line 276 of file class.ilObjRoleGUI.php.

References $_POST, $_SESSION, checkAccess(), ilUtil\getImagePath(), ilObjectFactory\getInstanceByRefId(), ilRoleDesktopItem\getItem(), listDesktopItemsObject(), ilUtil\sendFailure(), ilUtil\sendQuestion(), ilUtil\switchColor(), and USER_FOLDER_ID.

{
global $rbacsystem;
#if(!$rbacsystem->checkAccess('edit_permission', $this->rolf_ref_id))
if(!$this->checkAccess('edit_permission'))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
if(!$rbacsystem->checkAccess('push_desktop_items',USER_FOLDER_ID))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
if(!count($_POST['del_desk_item']))
{
ilUtil::sendFailure($this->lng->txt('role_select_one_item'));
return true;
}
ilUtil::sendQuestion($this->lng->txt('role_sure_delete_desk_items'));
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.role_ask_delete_desktop_item.html", "Services/AccessControl");
$this->tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
$this->tpl->setVariable("TBL_TITLE_IMG",ilUtil::getImagePath('icon_role.png'));
$this->tpl->setVariable("TBL_TITLE_IMG_ALT",$this->lng->txt('obj_role'));
$this->tpl->setVariable("TBL_TITLE",$this->lng->txt('role_assigned_desk_items').' ('.$this->object->getTitle().')');
$this->tpl->setVariable("HEADER_DESC",$this->lng->txt('description'));
$this->tpl->setVariable("BTN_DELETE",$this->lng->txt('delete'));
$this->tpl->setVariable("BTN_CANCEL",$this->lng->txt('cancel'));
include_once 'Services/AccessControl/classes/class.ilRoleDesktopItem.php';
$role_desk_item_obj =& new ilRoleDesktopItem($this->object->getId());
$counter = 0;
foreach($_POST['del_desk_item'] as $role_item_id)
{
$item_data = $role_desk_item_obj->getItem($role_item_id);
$tmp_obj =& ilObjectFactory::getInstanceByRefId($item_data['item_id']);
if(strlen($desc = $tmp_obj->getDescription()))
{
$this->tpl->setCurrentBlock("description");
$this->tpl->setVariable("DESCRIPTION_DESK",$desc);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("desk_row");
$this->tpl->setVariable("DESK_TITLE",$tmp_obj->getTitle());
$this->tpl->setVariable("ROW_CLASS",ilUtil::switchColor(++$counter,'tblrow1','tblrow2'));
$this->tpl->parseCurrentBlock();
}
$_SESSION['role_del_desk_items'] = $_POST['del_desk_item'];
return true;
}

+ Here is the call graph for this function:

ilObjRoleGUI::assignDesktopItemObject ( )

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

References $_GET, ilObject\_lookupType(), ilRoleDesktopItem\add(), selectDesktopItemObject(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and USER_FOLDER_ID.

{
global $rbacsystem;
if (!$rbacsystem->checkAccess('push_desktop_items',USER_FOLDER_ID))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
return false;
}
if (!isset($_GET['item_id']))
{
ilUtil::sendFailure($this->lng->txt('role_no_item_selected'));
return false;
}
include_once 'Services/AccessControl/classes/class.ilRoleDesktopItem.php';
$role_desk_item_obj =& new ilRoleDesktopItem($this->object->getId());
$role_desk_item_obj->add((int) $_GET['item_id'],ilObject::_lookupType((int) $_GET['item_id'],true));
ilUtil::sendSuccess($this->lng->txt('role_assigned_desktop_item'));
$this->ctrl->redirect($this,'listDesktopItems');
return true;
}

+ Here is the call graph for this function:

ilObjRoleGUI::assignSaveObject ( )

wrapper for renamed function

public

Definition at line 1180 of file class.ilObjRoleGUI.php.

{
$this->assignUserObject();
}
ilObjRoleGUI::cancelObject ( )

cancelObject is called when an operation is canceled, method links back public

Definition at line 1398 of file class.ilObjRoleGUI.php.

References $_GET.

{
if ($_GET["new_type"] != "role")
{
$this->ctrl->redirect($this, "userassignment");
}
else
{
$this->ctrl->redirectByClass("ilobjrolefoldergui","view");
}
}
ilObjRoleGUI::changeExistingObjectsObject ( )
protected

Change existing objects.

Returns

Definition at line 1821 of file class.ilObjRoleGUI.php.

References $_POST, ilObjectGUI\$tree, ilUtil\sendSuccess(), and ilUtil\stripSlashes().

{
global $tree,$rbacreview,$rbacadmin;
$mode = (int) $_POST['mode'];
$start = ($this->rolf_ref_id == ROLE_FOLDER_ID ? ROOT_FOLDER_ID : $tree->getParentId($this->rolf_ref_id));
$this->object->changeExistingObjects($start,$mode,unserialize(ilUtil::stripSlashes($_POST['type_filter'])));
ilUtil::sendSuccess($this->lng->txt('settings_saved'),true);
$this->ctrl->redirect($this,'perm');
}

+ Here is the call graph for this function:

ilObjRoleGUI::checkAccess (   $a_perm_global,
  $a_perm_obj = '' 
)

Definition at line 1704 of file class.ilObjRoleGUI.php.

Referenced by addUserObject(), adoptPermSaveObject(), askDeleteDesktopItemObject(), confirmDeleteRoleObject(), deassignUserObject(), deleteDesktopItemsObject(), editObject(), getTabs(), performDeleteRoleObject(), permObject(), permSaveObject(), and userassignmentObject().

{
global $rbacsystem,$ilAccess;
$a_perm_obj = $a_perm_obj ? $a_perm_obj : $a_perm_global;
if($this->rolf_ref_id == ROLE_FOLDER_ID)
{
return $rbacsystem->checkAccess($a_perm_global,$this->rolf_ref_id);
}
else
{
return $ilAccess->checkAccess($a_perm_obj,'',$this->obj_ref_id);
}
}

+ Here is the caller graph for this function:

ilObjRoleGUI::checkDuplicate (   $a_role_id = 0)
protected

Check if role with same name already exists in this folder.

Returns
bool

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

References $title, and ilObject\_lookupTitle().

Referenced by saveObject(), and updateObject().

{
global $rbacreview;
foreach($rbacreview->getRolesOfRoleFolder($this->rolf_ref_id) as $role_id)
{
if($role_id == $a_role_id)
{
continue;
}
$title = trim(ilObject::_lookupTitle($role_id));
if(strcmp($title, trim($this->form->getInput('title'))) === 0)
{
$this->form->getItemByPostVar('title')->setAlert($this->lng->txt('rbac_role_exists_alert'));
return true;
}
}
return false;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjRoleGUI::confirmDeleteRoleObject ( )
protected

Show delete confirmation screen.

Returns

Definition at line 918 of file class.ilObjRoleGUI.php.

References $ilErr, $ilUser, checkAccess(), ilUtil\getImagePath(), and ilUtil\sendQuestion().

{
global $ilErr,$rbacreview,$ilUser;
$access = $this->checkAccess('visible,write','edit_permission');
if (!$access)
{
$ilErr->raiseError($this->lng->txt('msg_no_perm_perm'),$ilErr->WARNING);
}
$question = $this->lng->txt('rbac_role_delete_qst');
if($rbacreview->isAssigned($ilUser->getId(), $this->object->getId()))
{
$question .= ('<br />'.$this->lng->txt('rbac_role_delete_self'));
}
include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
$confirm = new ilConfirmationGUI();
$confirm->setFormAction($this->ctrl->getFormAction($this));
$confirm->setHeaderText($question);
$confirm->setCancel($this->lng->txt('cancel'), 'perm');
$confirm->setConfirm($this->lng->txt('rbac_delete_role'), 'performDeleteRole');
$confirm->addItem(
'role',
$this->object->getId(),
$this->object->getTitle(),
ilUtil::getImagePath('icon_role.png')
);
$this->tpl->setContent($confirm->getHTML());
return true;
}

+ Here is the call graph for this function:

ilObjRoleGUI::createObject ( )

Only called from administration -> role folder ? Otherwise this check access is wrong.

Returns

Reimplemented from ilObjectGUI.

Definition at line 574 of file class.ilObjRoleGUI.php.

References $ilErr, and initFormRoleProperties().

{
global $rbacsystem;
if(!$rbacsystem->checkAccess('create_role',$this->rolf_ref_id))
{
$ilErr->raiseError($this->lng->txt('permission_denied'),$ilErr->MESSAGE);
}
$this->initFormRoleProperties(self::MODE_GLOBAL_CREATE);
$this->tpl->setContent($this->form->getHTML());
}

+ Here is the call graph for this function:

ilObjRoleGUI::deassignUserObject ( )

de-assign users from role

public

Definition at line 1244 of file class.ilObjRoleGUI.php.

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

{
global $rbacsystem, $rbacadmin, $rbacreview;
#if (!$rbacsystem->checkAccess("edit_userassignment", $this->rolf_ref_id))
if(!$this->checkAccess('edit_userassignment','edit_permission'))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_assign_user_to_role"),$this->ilias->error_obj->MESSAGE);
}
$selected_users = ($_POST["user_id"]) ? $_POST["user_id"] : array($_GET["user_id"]);
if ($selected_users[0]=== NULL)
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
// prevent unassignment of system user from system role
if ($this->object->getId() == SYSTEM_ROLE_ID)
{
if ($admin = array_search(SYSTEM_USER_ID,$selected_users) !== false)
unset($selected_users[$admin]);
}
// check for each user if the current role is his last global role before deassigning him
$last_role = array();
$global_roles = $rbacreview->getGlobalRoles();
foreach ($selected_users as $user)
{
$assigned_roles = $rbacreview->assignedRoles($user);
$assigned_global_roles = array_intersect($assigned_roles,$global_roles);
if (count($assigned_roles) == 1 or (count($assigned_global_roles) == 1 and in_array($this->object->getId(),$assigned_global_roles)))
{
$userObj = $this->ilias->obj_factory->getInstanceByObjId($user);
$last_role[$user] = $userObj->getFullName();
unset($userObj);
}
}
// ... else perform deassignment
foreach ($selected_users as $user)
{
if(!isset($last_role[$user]))
{
$rbacadmin->deassignUser($this->object->getId(), $user);
}
}
// update object data entry (to update last modification date)
$this->object->update();
// raise error if last role was taken from a user...
if(count($last_role))
{
$user_list = implode(", ",$last_role);
ilUtil::sendFailure($this->lng->txt('msg_is_last_role').': '.$user_list.'<br />'.$this->lng->txt('msg_min_one_role'),true);
}
else
{
ilUtil::sendSuccess($this->lng->txt("msg_userassignment_changed"), true);
}
$this->ctrl->redirect($this,'userassignment');
}

+ Here is the call graph for this function:

ilObjRoleGUI::deleteDesktopItemsObject ( )

Definition at line 337 of file class.ilObjRoleGUI.php.

References $_SESSION, checkAccess(), ilRoleDesktopItem\delete(), listDesktopItemsObject(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and USER_FOLDER_ID.

{
global $rbacsystem;
#if (!$rbacsystem->checkAccess('edit_permission', $this->rolf_ref_id))
if(!$this->checkAccess('edit_permission'))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
if (!$rbacsystem->checkAccess('push_desktop_items',USER_FOLDER_ID))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
if (!count($_SESSION['role_del_desk_items']))
{
ilUtil::sendFailure($this->lng->txt('role_select_one_item'));
return true;
}
include_once 'Services/AccessControl/classes/class.ilRoleDesktopItem.php';
$role_desk_item_obj =& new ilRoleDesktopItem($this->object->getId());
foreach ($_SESSION['role_del_desk_items'] as $role_item_id)
{
$role_desk_item_obj->delete($role_item_id);
}
ilUtil::sendSuccess($this->lng->txt('role_deleted_desktop_items'));
return true;
}

+ Here is the call graph for this function:

ilObjRoleGUI::editObject ( )

Edit role properties.

Returns

Reimplemented from ilObjectGUI.

Definition at line 591 of file class.ilObjRoleGUI.php.

References $ilErr, $ilSetting, checkAccess(), initFormRoleProperties(), and readRoleProperties().

{
global $rbacsystem, $rbacreview, $ilSetting,$ilErr;
if(!$this->checkAccess('write','edit_permission'))
{
$ilErr->raiseError($this->lng->txt("msg_no_perm_write"),$ilErr->MESSAGE);
}
$this->initFormRoleProperties(self::MODE_GLOBAL_UPDATE);
$this->readRoleProperties($this->object);
$this->tpl->setContent($this->form->getHTML());
}

+ Here is the call graph for this function:

& ilObjRoleGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Definition at line 82 of file class.ilObjRoleGUI.php.

References $cmd, $ret, $rolf_ref_id, ilExportOptions\allocateExportId(), ilExportOptions\KEY_ROOT, ilExportOptions\newInstance(), ilObjectGUI\prepareOutput(), and showDefaultPermissionSettings().

{
global $rbacsystem;
$this->prepareOutput();
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
switch($next_class)
{
case 'ilrepositorysearchgui':
include_once('./Services/Search/classes/class.ilRepositorySearchGUI.php');
$rep_search =& new ilRepositorySearchGUI();
$rep_search->setTitle($this->lng->txt('role_add_user'));
$rep_search->setCallback($this,'addUserObject');
// Set tabs
$this->tabs_gui->setTabActive('user_assignment');
$this->ctrl->setReturn($this,'userassignment');
$ret =& $this->ctrl->forwardCommand($rep_search);
break;
case 'ilexportgui':
$this->tabs_gui->setTabActive('export');
include_once './Services/Export/classes/class.ilExportOptions.php';
$eo->addOption(ilExportOptions::KEY_ROOT,0,$this->object->getId(),$this->rolf_ref_id);
include_once './Services/Export/classes/class.ilExportGUI.php';
$exp = new ilExportGUI($this, new ilObjRole($this->object->getId()));
$exp->addFormat('xml');
$this->ctrl->forwardCommand($exp);
break;
default:
if(!$cmd)
{
{
$cmd = "perm";
}
else
{
$cmd = 'userassignment';
}
}
$cmd .= "Object";
$this->$cmd();
break;
}
return true;
}

+ Here is the call graph for this function:

ilObjRoleGUI::getAdminTabs ( $tabs_gui)

admin and normal tabs are equal for roles

Reimplemented from ilObjectGUI.

Definition at line 184 of file class.ilObjRoleGUI.php.

References getTabs().

{
$this->getTabs($tabs_gui);
}

+ Here is the call graph for this function:

ilObjRoleGUI::getBackTarget ( )

Definition at line 176 of file class.ilObjRoleGUI.php.

{
return $this->back_target ? $this->back_target : array();
}
ilObjRoleGUI::getContainerType ( )
protected

Get type of role container.

Returns

Definition at line 193 of file class.ilObjRoleGUI.php.

References $container_type.

Referenced by showDefaultPermissionSettings().

{
}

+ Here is the caller graph for this function:

ilObjRoleGUI::getParentObjId ( )

Get obj_id of current object.

Returns

Definition at line 153 of file class.ilObjRoleGUI.php.

References $obj_obj_id.

Referenced by __construct().

{
}

+ Here is the caller graph for this function:

ilObjRoleGUI::getParentRefId ( )

Get ref id of current object (not role folder id)

Returns

Definition at line 144 of file class.ilObjRoleGUI.php.

References $obj_ref_id.

Referenced by __construct(), and permObject().

{
}

+ Here is the caller graph for this function:

ilObjRoleGUI::getParentType ( )

get type of current object (not role folder)

Returns

Definition at line 162 of file class.ilObjRoleGUI.php.

References $obj_obj_type.

Referenced by permObject(), and permSaveObject().

{
}

+ Here is the caller graph for this function:

ilObjRoleGUI::getTabs ( $tabs_gui)

get tabs abstract method.

overwrite in derived GUI class of your object type public

Parameters
objectinstance of ilTabsGUI

Reimplemented from ilObjectGUI.

Definition at line 1602 of file class.ilObjRoleGUI.php.

References $_GET, checkAccess(), and showDefaultPermissionSettings().

Referenced by __setHeader(), and getAdminTabs().

{
global $rbacsystem,$rbacreview, $ilHelp;
$base_role_folder = $rbacreview->getFoldersAssignedToRole($this->object->getId(),true);
//var_dump($base_role_folder);
//echo "-".$this->rolf_ref_id."-";
$activate_role_edit = false;
// todo: activate the following (allow editing of local roles in
// roles administration)
//if (in_array($this->rolf_ref_id,$base_role_folder))
if (in_array($this->rolf_ref_id,$base_role_folder) ||
(strtolower($_GET["baseClass"]) == "iladministrationgui" &&
$_GET["admin_mode"] == "settings"))
{
$activate_role_edit = true;
}
// not so nice (workaround for using tabs in repository)
$tabs_gui->clearTargets();
$ilHelp->setScreenIdComponent("role");
if ($this->back_target != "")
{
$tabs_gui->setBackTarget(
$this->back_target["text"],$this->back_target["link"]);
}
if($this->checkAccess('write','edit_permission') && $activate_role_edit)
{
$tabs_gui->addTarget("edit_properties",
$this->ctrl->getLinkTarget($this, "edit"), array("edit","update"), get_class($this));
}
/*
if($this->checkAccess('write','edit_permission') and $this->showDefaultPermissionSettings())
{
$force_active = ($_GET["cmd"] == "perm" || $_GET["cmd"] == "")
? true
: false;
$tabs_gui->addTarget("default_perm_settings",
$this->ctrl->getLinkTarget($this, "perm"), array("perm", "adoptPermSave", "permSave"),
get_class($this),
"", $force_active);
}
*/
if($this->checkAccess('write','edit_permission') and $this->showDefaultPermissionSettings())
{
$tabs_gui->addTarget(
"default_perm_settings",
$this->ctrl->getLinkTarget($this, "perm"), array(),get_class($this)
);
}
if($this->checkAccess('write','edit_permission') && $activate_role_edit && $this->object->getId() != ANONYMOUS_ROLE_ID)
{
$tabs_gui->addTarget("user_assignment",
$this->ctrl->getLinkTarget($this, "userassignment"),
array("deassignUser", "userassignment", "assignUser", "searchUserForm", "search"),
get_class($this));
}
if($this->checkAccess('write','edit_permission') && $activate_role_edit && $this->object->getId() != ANONYMOUS_ROLE_ID)
{
$tabs_gui->addTarget("desktop_items",
$this->ctrl->getLinkTarget($this, "listDesktopItems"),
array("listDesktopItems", "deleteDesktopItems", "selectDesktopItem", "askDeleteDesktopItem"),
get_class($this));
}
if($this->checkAccess('write','edit_permission'))
{
$tabs_gui->addTarget(
'export',
$this->ctrl->getLinkTargetByClass('ilExportGUI'),
array()
);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjRoleGUI::initFormRoleProperties (   $a_mode)
protected

Create role prperty form.

Returns
Parameters
int$a_mode

Definition at line 446 of file class.ilObjRoleGUI.php.

References $title, ilDiskQuotaActivationChecker\_isActive(), ilObjRole\isAutoGenerated(), ilFormPropertyGUI\setDisabled(), ilNumberInputGUI\setMinValue(), and ilCheckboxInputGUI\setValue().

Referenced by createObject(), editObject(), saveObject(), and updateObject().

{
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$this->form = new ilPropertyFormGUI();
if($this->creation_mode)
{
$this->ctrl->setParameter($this, "new_type", 'role');
}
$this->form->setFormAction($this->ctrl->getFormAction($this));
switch($a_mode)
{
case self::MODE_GLOBAL_CREATE:
$this->form->setTitle($this->lng->txt('role_new'));
$this->form->addCommandButton('save',$this->lng->txt('role_new'));
break;
case self::MODE_GLOBAL_UPDATE:
$this->form->setTitle($this->lng->txt('role_edit'));
$this->form->addCommandButton('update', $this->lng->txt('save'));
break;
case self::MODE_LOCAL_CREATE:
case self::MODE_LOCAL_UPDATE:
}
// Fix cancel
$this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
$title = new ilTextInputGUI($this->lng->txt('title'),'title');
if(ilObjRole::isAutoGenerated($this->object->getId()))
{
$title->setDisabled(true);
}
$title->setValidationRegexp('/^(?!il_).*$/');
$title->setValidationFailureMessage($this->lng->txt('msg_role_reserved_prefix'));
$title->setSize(40);
$title->setMaxLength(70);
$title->setRequired(true);
$this->form->addItem($title);
$desc = new ilTextAreaInputGUI($this->lng->txt('description'),'desc');
if(ilObjRole::isAutoGenerated($this->object->getId()))
{
$desc->setDisabled(true);
}
$desc->setCols(40);
$desc->setRows(3);
$this->form->addItem($desc);
if($this->rolf_ref_id == ROLE_FOLDER_ID)
{
$reg = new ilCheckboxInputGUI($this->lng->txt('allow_register'),'reg');
$reg->setValue(1);
#$reg->setInfo($this->lng->txt('rbac_new_acc_reg_info'));
$this->form->addItem($reg);
$la = new ilCheckboxInputGUI($this->lng->txt('allow_assign_users'),'la');
$la->setValue(1);
#$la->setInfo($this->lng->txt('rbac_local_admin_info'));
$this->form->addItem($la);
}
$pro = new ilCheckboxInputGUI($this->lng->txt('role_protect_permissions'),'pro');
$pro->setValue(1);
#$pro->setInfo($this->lng->txt('role_protext_permission_info'));
$this->form->addItem($pro);
include_once 'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
{
$quo = new ilNumberInputGUI($this->lng->txt('disk_quota'),'disk_quota');
$quo->setMinValue(0);
$quo->setSize(4);
$quo->setInfo($this->lng->txt('enter_in_mb_desc').'<br />'.$this->lng->txt('disk_quota_on_role_desc'));
$this->form->addItem($quo);
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjRoleGUI::isChangeExistingObjectsConfirmationRequired ( )
protected

Check if a confirmation about further settings is required or not.

Returns
bool

Definition at line 1724 of file class.ilObjRoleGUI.php.

References $_POST.

Referenced by permSaveObject().

{
global $rbacreview;
if(!(int) $_POST['recursive'] and !is_array($_POST['recursive_list']))
{
return false;
}
// Role is protected
if($rbacreview->isProtected($this->rolf_ref_id, $this->object->getId()))
{
// TODO: check if recursive_list is enabled
// and if yes: check if inheritance is broken for the relevant object types
return count($rbacreview->getFoldersAssignedToRole($this->object->getId())) > 1;
}
else
{
// TODO: check if recursive_list is enabled
// and if yes: check if inheritance is broken for the relevant object types
return count($rbacreview->getFoldersAssignedToRole($this->object->getId())) > 1;
}
}

+ Here is the caller graph for this function:

ilObjRoleGUI::listDesktopItemsObject ( )

Definition at line 210 of file class.ilObjRoleGUI.php.

References $rolf_ref_id, ilObjectGUI\$tree, __formatPath(), ilObjectGUI\__showButton(), ilUtil\getImagePath(), ilObjectFactory\getInstanceByRefId(), ilUtil\sendInfo(), ilUtil\switchColor(), and USER_FOLDER_ID.

Referenced by askDeleteDesktopItemObject(), deleteDesktopItemsObject(), and selectDesktopItemObject().

{
global $rbacsystem,$rbacreview,$tree;
#if(!$rbacsystem->checkAccess('edit_permission', $this->rolf_ref_id))
/*
if(!$this->checkAccess('edit_permission'))
{
ilUtil::sendFailure()
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
*/
if(!$rbacreview->isAssignable($this->object->getId(),$this->rolf_ref_id) &&
$this->rolf_ref_id != ROLE_FOLDER_ID)
{
ilUtil::sendInfo($this->lng->txt('role_no_users_no_desk_items'));
return true;
}
include_once 'Services/AccessControl/classes/class.ilRoleDesktopItem.php';
$role_desk_item_obj =& new ilRoleDesktopItem($this->object->getId());
if($rbacsystem->checkAccess('push_desktop_items',USER_FOLDER_ID))
{
$this->__showButton('selectDesktopItem',$this->lng->txt('role_desk_add'));
}
if(!count($items = $role_desk_item_obj->getAll()))
{
ilUtil::sendInfo($this->lng->txt('role_desk_none_created'));
return true;
}
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.role_desktop_item_list.html", "Services/AccessControl");
$this->tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
$this->tpl->setVariable("TBL_TITLE_IMG",ilUtil::getImagePath('icon_role.png'));
$this->tpl->setVariable("TBL_TITLE_IMG_ALT",$this->lng->txt('obj_role'));
$this->tpl->setVariable("TBL_TITLE",$this->lng->txt('role_assigned_desk_items').' ('.$this->object->getTitle().')');
$this->tpl->setVariable("HEADER_DESC",$this->lng->txt('description'));
$this->tpl->setVariable("BTN_DELETE",$this->lng->txt('delete'));
$this->tpl->setVariable("IMG_ARROW",ilUtil::getImagePath('arrow_downright.png'));
$counter = 0;
foreach($items as $role_item_id => $item)
{
$tmp_obj = ilObjectFactory::getInstanceByRefId($item['item_id']);
if(strlen($desc = $tmp_obj->getDescription()))
{
$this->tpl->setCurrentBlock("description");
$this->tpl->setVariable("DESCRIPTION_DESK",$desc);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("desk_row");
$this->tpl->setVariable("DESK_TITLE",$tmp_obj->getTitle());
$this->tpl->setVariable("ROW_CLASS",ilUtil::switchColor(++$counter,'tblrow1','tblrow2'));
$this->tpl->setVariable("CHECK_DESK",ilUtil::formCheckBox(0,'del_desk_item[]',$role_item_id));
$this->tpl->setVariable("TXT_PATH",$this->lng->txt('path').':');
$this->tpl->setVariable("PATH",$this->__formatPath($tree->getPathFull($item['item_id'])));
$this->tpl->parseCurrentBlock();
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjRoleGUI::listUsersRoleObject ( )

Definition at line 1411 of file class.ilObjRoleGUI.php.

References $_POST, $_SESSION, ilObjectGUI\__showButton(), ilUtil\formCheckbox(), ilObjectFactory\getInstanceByObjId(), and ilUtil\sendFailure().

{
global $rbacsystem,$rbacreview;
$_SESSION["role_role"] = $_POST["role"] = $_POST["role"] ? $_POST["role"] : $_SESSION["role_role"];
if (!is_array($_POST["role"]))
{
ilUtil::sendFailure($this->lng->txt("role_no_roles_selected"));
$this->searchObject();
return false;
}
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.role_usr_selection.html", "Services/AccessControl");
$this->__showButton("searchUserForm",$this->lng->txt("role_new_search"));
// GET ALL MEMBERS
$members = array();
foreach ($_POST["role"] as $role_id)
{
$members = array_merge($rbacreview->assignedUsers($role_id),$members);
}
$members = array_unique($members);
// FORMAT USER DATA
$counter = 0;
$f_result = array();
foreach($members as $user)
{
if(!$tmp_obj = ilObjectFactory::getInstanceByObjId($user,false))
{
continue;
}
$user_ids[$counter] = $user;
// TODO: exclude anonymous user
$f_result[$counter][] = ilUtil::formCheckbox(0,"user[]",$user);
$f_result[$counter][] = $tmp_obj->getLogin();
$f_result[$counter][] = $tmp_obj->getFirstname();
$f_result[$counter][] = $tmp_obj->getLastname();
unset($tmp_obj);
++$counter;
}
$this->__showSearchUserTable($f_result,$user_ids,"listUsersRole");
return true;
}

+ Here is the call graph for this function:

ilObjRoleGUI::loadRoleProperties ( ilObjRole  $role)
protected

Store form input in role object.

Returns
Parameters
object$role

Definition at line 532 of file class.ilObjRoleGUI.php.

References ilFormat\_getSizeMagnitude(), ilObjRole\setAllowRegister(), ilObject\setDescription(), ilObjRole\setDiskQuota(), ilObject\setTitle(), and ilObjRole\toggleAssignUsersStatus().

Referenced by saveObject(), and updateObject().

{
$role->setTitle($this->form->getInput('title'));
$role->setDescription($this->form->getInput('desc'));
$role->setAllowRegister($this->form->getInput('reg'));
$role->toggleAssignUsersStatus($this->form->getInput('la'));
$role->setDiskQuota($this->form->getInput('disk_quota') * pow(ilFormat::_getSizeMagnitude(),2));
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjRoleGUI::mailToRoleObject ( )

Definition at line 1685 of file class.ilObjRoleGUI.php.

References $_SESSION, ilObject\_getIdsForTitle(), ilMailFormCall\getRedirectTarget(), and ilUtil\redirect().

{
global $rbacreview;
$obj_ids = ilObject::_getIdsForTitle($this->object->getTitle(), $this->object->getType());
if(count($obj_ids) > 1)
{
$_SESSION['mail_roles'][] = '#il_role_'.$this->object->getId();
}
else
{
$_SESSION['mail_roles'][] = $rbacreview->getRoleMailboxAddress($this->object->getId());
}
require_once 'Services/Mail/classes/class.ilMailFormCall.php';
$script = ilMailFormCall::getRedirectTarget($this, 'userassignment', array(), array('type' => 'role'));
ilUtil::redirect($script);
}

+ Here is the call graph for this function:

ilObjRoleGUI::performDeleteRoleObject ( )
protected

Delete role.

Returns

Definition at line 959 of file class.ilObjRoleGUI.php.

References $_GET, $ilErr, checkAccess(), and ilUtil\sendSuccess().

{
global $ilErr;
$access = $this->checkAccess('visible,write','edit_permission');
if (!$access)
{
$ilErr->raiseError($this->lng->txt('msg_no_perm_perm'),$ilErr->WARNING);
}
$this->object->setParent((int) $_GET['rolf_ref_id']);
$this->object->delete();
ilUtil::sendSuccess($this->lng->txt('msg_deleted_role'),true);
$this->ctrl->returnToParent($this);
}

+ Here is the call graph for this function:

ilObjRoleGUI::permObject (   $a_show_admin_permissions = false)
protected

Show template permissions.

Returns
void

Definition at line 693 of file class.ilObjRoleGUI.php.

References $ilErr, ilObjectGUI\$objDefinition, $rolf_ref_id, ilTable2GUI\addMultiCommand(), checkAccess(), ilAccordionGUI\FORCE_ALL_OPEN, getParentRefId(), getParentType(), ilPlugin\lookupTxt(), ilObjectRoleTemplatePermissionTableGUI\parse(), setSubTabs(), and ilUtil\sortArray().

Referenced by adminPermObject().

{
global $ilTabs, $ilErr, $ilToolbar, $objDefinition,$rbacreview;
$ilTabs->setTabActive('default_perm_settings');
$this->setSubTabs('default_perm_settings');
if($a_show_admin_permissions)
{
$ilTabs->setSubTabActive('rbac_admin_permissions');
}
else
{
$ilTabs->setSubTabActive('rbac_repository_permissions');
}
if(!$this->checkAccess('write','edit_permission'))
{
$ilErr->raiseError($this->lng->txt('msg_no_perm_perm'),$ilErr->MESSAGE);
return true;
}
// Show copy role button
$ilToolbar->setFormAction($this->ctrl->getFormAction($this));
$ilToolbar->addButton(
$this->lng->txt("adopt_perm_from_template"),
$this->ctrl->getLinkTarget($this,'adoptPerm')
);
if($rbacreview->isDeleteable($this->object->getId(), $this->rolf_ref_id))
{
$ilToolbar->addButton(
$this->lng->txt('rbac_delete_role'),
$this->ctrl->getLinkTarget($this,'confirmDeleteRole')
);
}
$this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.rbac_template_permissions.html',
'Services/AccessControl'
);
$this->tpl->setVariable('PERM_ACTION',$this->ctrl->getFormAction($this));
include_once './Services/Accordion/classes/class.ilAccordionGUI.php';
$acc = new ilAccordionGUI();
$acc->setBehaviour(ilAccordionGUI::FORCE_ALL_OPEN);
$acc->setId('template_perm_'.$this->getParentRefId());
if($this->rolf_ref_id == ROLE_FOLDER_ID)
{
if($a_show_admin_permissions)
{
$subs = $objDefinition->getSubObjectsRecursively('adm',true,true);
}
else
{
$subs = $objDefinition->getSubObjectsRecursively('root',true,$a_show_admin_permissions);
}
}
else
{
$subs = $objDefinition->getSubObjectsRecursively($this->getParentType(),true,$a_show_admin_permissions);
}
$sorted = array();
foreach($subs as $subtype => $def)
{
if($objDefinition->isPlugin($subtype))
{
$translation = ilPlugin::lookupTxt("rep_robj", $subtype,"obj_".$subtype);
}
elseif($objDefinition->isSystemObject($subtype))
{
$translation = $this->lng->txt("obj_".$subtype);
}
else
{
$translation = $this->lng->txt('objs_'.$subtype);
}
$sorted[$subtype] = $def;
$sorted[$subtype]['translation'] = $translation;
}
$sorted = ilUtil::sortArray($sorted, 'translation','asc',true,true);
foreach($sorted as $subtype => $def)
{
if($objDefinition->isPlugin($subtype))
{
$translation = ilPlugin::lookupTxt("rep_robj", $subtype,"obj_".$subtype);
}
elseif($objDefinition->isSystemObject($subtype))
{
$translation = $this->lng->txt("obj_".$subtype);
}
else
{
$translation = $this->lng->txt('objs_'.$subtype);
}
include_once 'Services/AccessControl/classes/class.ilObjectRoleTemplatePermissionTableGUI.php';
$this,
'perm',
$this->getParentRefId(),
$this->object->getId(),
$subtype,
$a_show_admin_permissions
);
$tbl->parse();
$acc->addItem($translation, $tbl->getHTML());
}
$this->tpl->setVariable('ACCORDION',$acc->getHTML());
// Add options table
include_once './Services/AccessControl/classes/class.ilObjectRoleTemplateOptionsTableGUI.php';
$this,
'perm',
$this->rolf_ref_id,
$this->object->getId(),
$a_show_admin_permissions
);
$options->addMultiCommand(
$a_show_admin_permissions ? 'adminPermSave' : 'permSave',
$this->lng->txt('save')
);
$options->parse();
$this->tpl->setVariable('OPTIONS_TABLE',$options->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjRoleGUI::permSaveObject (   $a_show_admin_permissions = false)

save permissions

public

Definition at line 981 of file class.ilObjRoleGUI.php.

References $_POST, ilObjectGUI\$objDefinition, $rolf_ref_id, ilObjectGUI\$tree, ilRbacLog\add(), checkAccess(), ilRbacLog\diffTemplate(), ilRbacLog\EDIT_TEMPLATE, ilRbacLog\gatherTemplate(), getParentType(), ilRbacLog\isActive(), isChangeExistingObjectsConfirmationRequired(), ilObjRole\MODE_PROTECTED_KEEP_LOCAL_POLICIES, ilObjRole\MODE_UNPROTECTED_KEEP_LOCAL_POLICIES, ilUtil\sendSuccess(), showChangeExistingObjectsConfirmation(), and ilUtil\tf2yn().

Referenced by adminPermSaveObject().

{
global $rbacsystem, $rbacadmin, $rbacreview, $objDefinition, $tree;
// for role administration check write of global role folder
/*
if ($this->rolf_ref_id == ROLE_FOLDER_ID)
{
$access = $rbacsystem->checkAccess('write',$this->rolf_ref_id);
}
else // for local roles check 'edit permission' of parent object of the local role folder
{
$access = $rbacsystem->checkAccess('edit_permission',$tree->getParentId($this->rolf_ref_id));
}
*/
$access = $this->checkAccess('visible,write','edit_permission');
if (!$access)
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_perm"),$this->ilias->error_obj->MESSAGE);
}
// rbac log
include_once "Services/AccessControl/classes/class.ilRbacLog.php";
$rbac_log_active = ilRbacLog::isActive();
if($rbac_log_active)
{
$rbac_log_old = ilRbacLog::gatherTemplate($this->rolf_ref_id, $this->object->getId());
}
// delete all template entries of enabled types
if($this->rolf_ref_id == ROLE_FOLDER_ID)
{
if($a_show_admin_permissions)
{
$subs = $objDefinition->getSubObjectsRecursively('adm',true,true);
}
else
{
$subs = $objDefinition->getSubObjectsRecursively('root',true,false);
}
}
else
{
$subs = $objDefinition->getSubObjectsRecursively($this->getParentType(),true,false);
}
foreach($subs as $subtype => $def)
{
// Delete per object type
$rbacadmin->deleteRolePermission($this->object->getId(),$this->rolf_ref_id,$subtype);
}
if (empty($_POST["template_perm"]))
{
$_POST["template_perm"] = array();
}
foreach ($_POST["template_perm"] as $key => $ops_array)
{
// sets new template permissions
$rbacadmin->setRolePermission($this->object->getId(), $key, $ops_array, $this->rolf_ref_id);
}
if($rbac_log_active)
{
$rbac_log_new = ilRbacLog::gatherTemplate($this->rolf_ref_id, $this->object->getId());
$rbac_log_diff = ilRbacLog::diffTemplate($rbac_log_old, $rbac_log_new);
ilRbacLog::add(ilRbacLog::EDIT_TEMPLATE, $this->obj_ref_id, $rbac_log_diff);
}
// update object data entry (to update last modification date)
$this->object->update();
// set protected flag
if ($this->rolf_ref_id == ROLE_FOLDER_ID or $rbacreview->isAssignable($this->object->getId(),$this->rolf_ref_id))
{
$rbacadmin->setProtected($this->rolf_ref_id,$this->object->getId(),ilUtil::tf2yn($_POST['protected']));
}
if($a_show_admin_permissions)
{
$_POST['recursive'] = true;
}
// Redirect if Change existing objects is not chosen
if(!$_POST['recursive'] and !is_array($_POST['recursive_list']))
{
ilUtil::sendSuccess($this->lng->txt("saved_successfully"),true);
if($a_show_admin_permissions)
{
$this->ctrl->redirect($this,'adminPerm');
}
else
{
$this->ctrl->redirect($this,'perm');
}
}
// New implementation
if($this->isChangeExistingObjectsConfirmationRequired() and !$a_show_admin_permissions)
{
return true;
}
$start = ($this->rolf_ref_id == ROLE_FOLDER_ID ? ROOT_FOLDER_ID : $tree->getParentId($this->rolf_ref_id));
if($a_show_admin_permissions)
{
$start = $tree->getParentId($this->rolf_ref_id);
}
if($_POST['protected'])
{
$this->object->changeExistingObjects(
$start,
array('all'),
array()
#$a_show_admin_permissions ? array('adm') : array()
);
}
else
{
$this->object->changeExistingObjects(
$start,
array('all'),
array()
#$a_show_admin_permissions ? array('adm') : array()
);
}
ilUtil::sendSuccess($this->lng->txt("saved_successfully"),true);
if($a_show_admin_permissions)
{
$this->ctrl->redirect($this,'adminPerm');
}
else
{
$this->ctrl->redirect($this,'perm');
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjRoleGUI::readRoleProperties ( ilObjRole  $role)
protected

Read role properties and write them to form.

Returns
Parameters
object$role

Definition at line 547 of file class.ilObjRoleGUI.php.

References ilObjectGUI\$data, ilFormat\_getSizeMagnitude(), ilDiskQuotaActivationChecker\_isActive(), ilObjRole\getAllowRegister(), ilObjRole\getAssignUsersStatus(), ilObject\getDescription(), ilObjRole\getDiskQuota(), ilObject\getId(), and ilObject\getTitle().

Referenced by editObject().

{
global $rbacreview;
include_once 'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
$data['title'] = $role->getTitle();
$data['desc'] = $role->getDescription();
$data['reg'] = $role->getAllowRegister();
$data['la'] = $role->getAssignUsersStatus();
{
$data['disk_quota'] = $role->getDiskQuota() / (pow(ilFormat::_getSizeMagnitude(),2));
}
$data['pro'] = $rbacreview->isProtected($this->rolf_ref_id, $role->getId());
$this->form->setValuesByArray($data);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjRoleGUI::saveObject ( )

Save new role.

Returns

Reimplemented from ilObjectGUI.

Definition at line 609 of file class.ilObjRoleGUI.php.

References $rolf_ref_id, checkDuplicate(), initFormRoleProperties(), loadRoleProperties(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $rbacadmin,$rbacreview;
$this->initFormRoleProperties(self::MODE_GLOBAL_CREATE);
if($this->form->checkInput() and !$this->checkDuplicate())
{
include_once './Services/AccessControl/classes/class.ilObjRole.php';
$this->loadRoleProperties($this->role = new ilObjRole());
$this->role->create();
$rbacadmin->assignRoleToFolder($this->role->getId(), $this->rolf_ref_id,'y');
$rbacadmin->setProtected(
$this->rolf_ref_id,
$this->role->getId(),
$this->form->getInput('pro') ? 'y' : 'n'
);
ilUtil::sendSuccess($this->lng->txt("role_added"),true);
$this->ctrl->returnToParent($this);
}
ilUtil::sendFailure($this->lng->txt('err_check_input'));
$this->form->setValuesByPost();
$this->tpl->setContent($this->form->getHTML());
return false;
}

+ Here is the call graph for this function:

ilObjRoleGUI::selectDesktopItemObject ( )

Definition at line 377 of file class.ilObjRoleGUI.php.

References $_GET, ilObjectGUI\$tree, ilObjectGUI\__showButton(), listDesktopItemsObject(), ilUtil\sendFailure(), ilUtil\sendInfo(), and USER_FOLDER_ID.

Referenced by assignDesktopItemObject().

{
global $rbacsystem,$tree;
include_once 'Services/AccessControl/classes/class.ilRoleDesktopItemSelector.php';
include_once 'Services/AccessControl/classes/class.ilRoleDesktopItem.php';
if(!$rbacsystem->checkAccess('push_desktop_items',USER_FOLDER_ID))
{
#$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
ilUtil::sendFailure($this->lng->txt('permission_denied'));
return false;
}
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.role_desktop_item_selector.html", "Services/AccessControl");
$this->__showButton('listDesktopItems',$this->lng->txt('back'));
ilUtil::sendInfo($this->lng->txt("role_select_desktop_item"));
$exp = new ilRoleDesktopItemSelector($this->ctrl->getLinkTarget($this,'selectDesktopItem'),
new ilRoleDesktopItem($this->object->getId()));
$exp->setExpand($_GET["role_desk_item_link_expand"] ? $_GET["role_desk_item_link_expand"] : $tree->readRootId());
$exp->setExpandTarget($this->ctrl->getLinkTarget($this,'selectDesktopItem'));
$exp->setOutput(0);
$output = $exp->getOutput();
$this->tpl->setVariable("EXPLORER",$output);
//$this->tpl->setVariable("EXPLORER", $exp->getOutput());
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjRoleGUI::setBackTarget (   $a_text,
  $a_link 
)

set back tab target

Definition at line 170 of file class.ilObjRoleGUI.php.

{
$this->back_target = array("text" => $a_text,
"link" => $a_link);
}
ilObjRoleGUI::setSubTabs (   $a_tab)
protected

Set sub tabs.

Parameters
object$a_tab
Returns

Definition at line 1838 of file class.ilObjRoleGUI.php.

Referenced by permObject().

{
global $ilTabs;
switch($a_tab)
{
case 'default_perm_settings':
if($this->rolf_ref_id != ROLE_FOLDER_ID)
{
return true;
}
$ilTabs->addSubTabTarget(
'rbac_repository_permissions',
$this->ctrl->getLinkTarget($this,'perm')
);
$ilTabs->addSubTabTarget(
'rbac_admin_permissions',
$this->ctrl->getLinkTarget($this,'adminPerm')
);
}
return true;
}

+ Here is the caller graph for this function:

ilObjRoleGUI::showChangeExistingObjectsConfirmation ( )
protected

Show confirmation screen.

Returns

Definition at line 1752 of file class.ilObjRoleGUI.php.

References $_POST, ilObjRole\MODE_PROTECTED_DELETE_LOCAL_POLICIES, ilObjRole\MODE_PROTECTED_KEEP_LOCAL_POLICIES, ilObjRole\MODE_UNPROTECTED_DELETE_LOCAL_POLICIES, ilObjRole\MODE_UNPROTECTED_KEEP_LOCAL_POLICIES, ilRadioGroupInputGUI\setValue(), and ilRadioOption\setValue().

Referenced by permSaveObject().

{
$protected = $_POST['protected'];
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this,'changeExistingObjects'));
$form->setTitle($this->lng->txt('rbac_change_existing_confirm_tbl'));
$form->addCommandButton('changeExistingObjects', $this->lng->txt('change_existing_objects'));
$form->addCommandButton('perm',$this->lng->txt('cancel'));
$hidden = new ilHiddenInputGUI('type_filter');
$hidden->setValue(
$_POST['recursive'] ?
serialize(array('all')) :
serialize($_POST['recursive_list'])
);
$form->addItem($hidden);
$rad = new ilRadioGroupInputGUI($this->lng->txt('rbac_local_policies'),'mode');
if($protected)
{
$keep = new ilRadioOption(
$this->lng->txt('rbac_keep_local_policies'),
$this->lng->txt('rbac_keep_local_policies_info')
);
}
else
{
$keep = new ilRadioOption(
$this->lng->txt('rbac_keep_local_policies'),
$this->lng->txt('rbac_unprotected_keep_local_policies_info')
);
}
$rad->addOption($keep);
if($protected)
{
$del = new ilRadioOption(
$this->lng->txt('rbac_delete_local_policies'),
$this->lng->txt('rbac_delete_local_policies_info')
);
}
else
{
$del = new ilRadioOption(
$this->lng->txt('rbac_delete_local_policies'),
$this->lng->txt('rbac_unprotected_delete_local_policies_info')
);
}
$rad->addOption($del);
$form->addItem($rad);
$this->tpl->setContent($form->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjRoleGUI::showDefaultPermissionSettings ( )
protected

check if default permissions are shown or not

Returns

Definition at line 202 of file class.ilObjRoleGUI.php.

References ilObjectGUI\$objDefinition, and getContainerType().

Referenced by executeCommand(), and getTabs().

{
return $objDefinition->isContainer($this->getContainerType());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjRoleGUI::updateObject ( )

Save role settings.

Returns

Reimplemented from ilObjectGUI.

Definition at line 664 of file class.ilObjRoleGUI.php.

References checkDuplicate(), initFormRoleProperties(), loadRoleProperties(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $rbacadmin;
$this->initFormRoleProperties(self::MODE_GLOBAL_UPDATE);
if($this->form->checkInput() and !$this->checkDuplicate($this->object->getId()))
{
include_once './Services/AccessControl/classes/class.ilObjRole.php';
$this->loadRoleProperties($this->object);
$this->object->update();
$rbacadmin->setProtected(
$this->rolf_ref_id,
$this->object->getId(),
$this->form->getInput('pro') ? 'y' : 'n'
);
ilUtil::sendSuccess($this->lng->txt("saved_successfully"),true);
$this->ctrl->redirect($this,'edit');
}
ilUtil::sendFailure($this->lng->txt('err_check_input'));
$this->form->setValuesByPost();
$this->tpl->setContent($this->form->getHTML());
return false;
}

+ Here is the call graph for this function:

ilObjRoleGUI::userassignmentObject ( )

display user assignment panel

Definition at line 1315 of file class.ilObjRoleGUI.php.

References $ilUser, ilObjectGUI\$lng, ilSecuritySettings\_getInstance(), checkAccess(), and ilRepositorySearchGUI\fillAutoCompleteToolbar().

{
global $rbacreview, $rbacsystem, $lng, $ilUser;
//if (!$rbacsystem->checkAccess("edit_userassignment", $this->rolf_ref_id))
if(!$this->checkAccess('edit_userassignment','edit_permission'))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_assign_user_to_role"),$this->ilias->error_obj->MESSAGE);
}
$this->tabs_gui->setTabActive('user_assignment');
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.rbac_ua.html','Services/AccessControl');
include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
$tb = new ilToolbarGUI();
// protected admin role
include_once './Services/PrivacySecurity/classes/class.ilSecuritySettings.php';
if(
$this->object->getId() != SYSTEM_ROLE_ID ||
(
!$rbacreview->isAssigned($ilUser->getId(),SYSTEM_ROLE_ID) or
!ilSecuritySettings::_getInstance()->isAdminRoleProtected()
)
)
{
// add member
include_once './Services/Search/classes/class.ilRepositorySearchGUI.php';
$this,
$tb,
array(
'auto_complete_name' => $lng->txt('user'),
'submit_name' => $lng->txt('add')
)
);
/*
// add button
$tb->addFormButton($lng->txt("add"), "assignUser");
*/
$tb->addSpacer();
$tb->addButton(
$this->lng->txt('search_user'),
$this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI','start')
);
$tb->addSpacer();
}
$tb->addButton(
$this->lng->txt('role_mailto'),
$this->ctrl->getLinkTarget($this,'mailToRole')
);
$this->tpl->setVariable('BUTTONS_UA',$tb->getHTML());
include_once './Services/PrivacySecurity/classes/class.ilSecuritySettings.php';
$role_assignment_editable = true;
if(
$this->object->getId() == SYSTEM_ROLE_ID &&
!ilSecuritySettings::_getInstance()->checkAdminRoleAccessible($ilUser->getId()))
{
$role_assignment_editable = false;
}
include_once './Services/AccessControl/classes/class.ilAssignedUsersTableGUI.php';
$ut = new ilAssignedUsersTableGUI($this,'userassignment',$this->object->getId(),$role_assignment_editable);
$this->tpl->setVariable('TABLE_UA',$ut->getHTML());
return true;
}

+ Here is the call graph for this function:

Field Documentation

ilObjRoleGUI::$container_type = ''
protected

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

Referenced by getContainerType().

ilObjRoleGUI::$ctrl

Definition at line 46 of file class.ilObjRoleGUI.php.

ilObjRoleGUI::$obj_obj_id = 0
protected

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

Referenced by getParentObjId().

ilObjRoleGUI::$obj_obj_type = ''
protected

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

Referenced by getParentType().

ilObjRoleGUI::$obj_ref_id = 0
protected

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

Referenced by getParentRefId().

ilObjRoleGUI::$type

Definition at line 31 of file class.ilObjRoleGUI.php.

const ilObjRoleGUI::MODE_GLOBAL_CREATE = 2

Definition at line 22 of file class.ilObjRoleGUI.php.

const ilObjRoleGUI::MODE_GLOBAL_UPDATE = 1

Definition at line 21 of file class.ilObjRoleGUI.php.

const ilObjRoleGUI::MODE_LOCAL_CREATE = 4

Definition at line 24 of file class.ilObjRoleGUI.php.

const ilObjRoleGUI::MODE_LOCAL_UPDATE = 3

Definition at line 23 of file class.ilObjRoleGUI.php.


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