39         $ilCtrl = $DIC[
'ilCtrl'];
    41         $rbacsystem = $DIC[
'rbacsystem'];
    43         $this->factory = $DIC->ui()->factory();
    44         $this->renderer = $DIC->ui()->renderer();
    48         $this->
setId(
"usrroleass");
    58         $this->
addColumn($this->
lng->txt(
"description"), 
"description");
    61         $this->edit_access = $rbacsystem->checkAccess(
"edit_roleassignment", 
USER_FOLDER_ID);
    64         $this->
setRowTemplate(
"tpl.role_assignment_row.html", 
"Services/User");
    67         if ($this->edit_access) {
    90         $option[0] = 
$lng->
txt(
'assigned_roles');
    91         $option[1] = 
$lng->
txt(
'all_roles');
    92         $option[2] = 
$lng->
txt(
'all_global_roles');
    93         $option[3] = 
$lng->
txt(
'all_local_roles');
    94         $option[4] = 
$lng->
txt(
'internal_local_roles_only');
    95         $option[5] = 
$lng->
txt(
'non_internal_local_roles_only');
    97         if ($this->edit_access) {
   101             $si->readFromSession();
   102             $this->
filter[
"role_filter"] = $si->getValue();
   104             $this->
filter[
"role_filter"] = 0;
   108     protected function fillRow(array $a_set): void 
   110         if ($this->edit_access) {
   111             if (isset($a_set[
'checkbox'][
'id'])) {
   112                 $this->tpl->setVariable(
'VAL_ID', $a_set[
'checkbox'][
'id']);
   113                 if ($a_set[
'checkbox'][
'disabled']) {
   114                     $this->tpl->setVariable(
'VAL_DISABLED', 
'disabled="disabled"');
   116                 if ($a_set[
'checkbox'][
'checked']) {
   117                     $this->tpl->setVariable(
'VAL_CHECKED', 
'checked="checked"');
   122         $this->
ctrl->setParameterByClass(
"ilobjrolegui", 
"ref_id", $a_set[
'ref_id']);
   123         $this->
ctrl->setParameterByClass(
"ilobjrolegui", 
"obj_id", $a_set[
"obj_id"]);
   125         $this->tpl->setVariable(
   127             $this->renderer->render(
   128                 $this->factory->link()->standard(
   130                     $this->
ctrl->getLinkTargetByClass(ilObjRoleGUI::class, 
'perm')
   134         $this->tpl->setVariable(
'DESCRIPTION', $a_set[
'description']);
   137         if ($a_set[
'role_type'] === 
'local') {
   139                 $this->factory->link()->standard(
   148         $this->tpl->setVariable(
'CONTEXT', 
$context);
   149         $this->tpl->setVariable(
'PATH', $a_set[
'path']);
   152     public function parse(
int $usr_id): void
   155         $rbacreview = $DIC->rbac()->review();
   156         $tree = $DIC->repositoryTree();
   157         $ilUser = $DIC->user();
   160         $assigned_roles = $rbacreview->assignedRoles($usr_id);
   165         foreach ($rbacreview->getRolesByFilter((
int) $this->filter[
'role_filter'], $usr_id) as $role) {
   167             $rolf = $rbacreview->getFoldersAssignedToRole($role[
"obj_id"], 
true);
   168             $ref_id = $rbacreview->getObjectReferenceOfRole($role[
'rol_id']);
   171             if ($rbacreview->isDeleted($rolf[0])) {
   176             if ($tree->isInTree($rolf[0])) {
   180                     $tmpPath = $tree->getPathFull($rolf[0]);
   184                 $context = 
"<b>Rolefolder " . $rolf[0] . 
" not found in tree! (Role " . $role[
"obj_id"] . 
")</b>";
   191                 (!in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId())) && $role[
"obj_id"] === (
int) SYSTEM_ROLE_ID)
   197             if ($role[
'obj_id'] == SYSTEM_ROLE_ID && !$rbacreview->isAssigned($ilUser->getId(), 
SYSTEM_ROLE_ID)) {
   203             if (strpos($role[
"title"], 
"il_") === 0) {
   205                     $rolf_arr = $rbacreview->getFoldersAssignedToRole($role[
"obj_id"], 
true);
   206                     $rolf2 = $rolf_arr[0];
   211                 $parent_node = $tree->getNodeData($rolf2);
   212                 if (!isset($parent_node[
'type']) || !isset($parent_node[
'obj_id'])) {
   215                 $role[
'description'] = 
"{$this->lng->txt("obj_{$parent_node[
'type']}
")} (#{$parent_node['obj_id']})";
   218             $role_ids[$counter] = $role[
"obj_id"];
   221                 'id' => $role[
'obj_id'],
   222                 'disabled' => $disabled,
   223                 'checked' => in_array($role[
'obj_id'], $assigned_roles)
   229                 "description" => $role[
"description"],
   231                 "checkbox" => $checkbox,
   232                 "role_type" => $role[
"role_type"],
   234                 "obj_id" => $role[
"obj_id"],
   250             return $this->
lng->txt(
'obj_' . $type);
   263             $title = $list->getTitle();
 
Creates a path for a start and endnode. 
 
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
 
setFormAction(string $a_form_action, bool $a_multipart=false)
 
addFilterItem(ilTableFilterItem $a_input_item, bool $a_optional=false)
 
ILIAS UI Renderer $renderer
 
setEnableTitle(bool $a_enabletitle)
 
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
 
const SYSTEM_USER_ID
This file contains constants for PHPStan analyis, see: https://phpstan.org/config-reference#constants...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
setDisableFilterHiding(bool $a_val=true)
 
static resetToDefaults()
reset to defaults 
 
loadLanguageModule(string $a_module)
Load language module. 
 
ILIAS UI Factory $factory
 
static _lookupObjId(int $ref_id)
 
__construct(object $a_parent_obj, string $a_parent_cmd)
 
parses the objects.xml it handles the xml-description of all ilias objects 
 
static _lookupTitle(int $obj_id)
 
setDefaultOrderField(string $a_defaultorderfield)
 
static _getTranslation(string $a_role_title)
 
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template. 
 
setDefaultOrderDirection(string $a_defaultorderdirection)
 
static _getListGUIByType(string $type, int $context=ilObjectListGUI::CONTEXT_REPOSITORY)
 
getTitleForReference(int $ref_id)
 
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
ilObjectDefinition $objectDefinition
 
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
 
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
 
static _lookupType(int $id, bool $reference=false)
 
static setUseRelativeDates(bool $a_status)
set use relative dates 
 
addMultiCommand(string $a_cmd, string $a_text)
 
static _getInstance()
Get instance of ilSecuritySettings. 
 
setEnableHeader(bool $a_enableheader)