ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilObjAuthSettingsGUI Class Reference

ilObjAuthSettingsGUI: ilPermissionGUI, ilRegistrationSettingsGUI, ilLDAPSettingsGUI ilObjAuthSettingsGUI: ilAuthShibbolethSettingsGUI, ilCASSettingsGUI ilObjAuthSettingsGUI: ilSamlSettingsGUI, ilOpenIdConnectSettingsGUI ilObjAuthSettingsGUI: ilObjectContentStyleSettingsGUI More...

+ Inheritance diagram for ilObjAuthSettingsGUI:
+ Collaboration diagram for ilObjAuthSettingsGUI:

Public Member Functions

 __construct ($a_data, int $a_id, bool $a_call_by_reference, bool $a_prepare_output=true)
 
 viewObject ()
 
 cancelObject ()
 
 setAuthModeObject ()
 
 editSOAPObject ()
 
 testSoapAuthConnectionObject ()
 
 saveSOAPObject ()
 
 editScriptObject ()
 
 saveScriptObject ()
 
 executeCommand ()
 
 getAdminTabs ()
 
 setSubTabs (string $a_tab)
 
 apacheAuthSettingsObject (?ilPropertyFormGUI $form=null)
 
 saveApacheSettingsObject ()
 
 getApacheAuthSettingsForm ()
 
 registrationSettingsObject ()
 
- Public Member Functions inherited from ilObjectGUI
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 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...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Protected Member Functions

 getTabs ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $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 ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Private Member Functions

 authSettingsObject (?ILIAS\UI\Component\Input\Container\Form\Form $auth_mode_determination_form=null, ?ILIAS\UI\Component\Input\Container\Form\Form $registration_role_mapping_form=null)
 
 buildRegistrationRoleMappingForm ()
 
 updateRegistrationRoleMappingObject ()
 
 buildAuthModeDeterminationForm ()
 
 updateAuthModeDeterminationObject ()
 
 buildSOAPForm (string $submit_action)
 
 buildSOAPTestForm (string $submit_action)
 
 getAuthModeTitle ()
 
 validateApacheAuthAllowedDomains (string $text)
 

Private Attributes

const PROP_AUTH_MODE_KIND = 'kind'
 
const PROP_AUTH_MODE_SEQUENCE = 'sequence'
 
ilLogger $logger
 
ILIAS HTTP GlobalHttpState $http
 
GUIService $content_style_gui
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 
- Data Fields inherited from ilObjectGUI
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjAuthSettingsGUI::__construct (   $a_data,
int  $a_id,
bool  $a_call_by_reference,
bool  $a_prepare_output = true 
)

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

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\Repository\logger().

41  {
42  $this->type = 'auth';
43  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
44 
45  global $DIC;
46  $this->logger = $DIC->logger()->auth();
47 
48  $this->http = $DIC->http();
49 
50  $this->lng->loadLanguageModule('registration');
51  $this->lng->loadLanguageModule('auth');
52  $this->lng->loadLanguageModule('content');
53  $this->content_style_gui = $DIC->contentStyle()->gui();
54  }
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ apacheAuthSettingsObject()

ilObjAuthSettingsGUI::apacheAuthSettingsObject ( ?ilPropertyFormGUI  $form = null)

Definition at line 1077 of file class.ilObjAuthSettingsGUI.php.

References $path, ilObjectGUI\$settings, CLIENT_ID, ilSetting\getAll(), getApacheAuthSettingsForm(), ILIAS_DATA_DIR, and null.

Referenced by saveApacheSettingsObject().

1077  : void
1078  {
1079  $this->tabs_gui->setTabActive('apache_auth_settings');
1080 
1081  if ($form === null) {
1082  $form = $this->getApacheAuthSettingsForm();
1083 
1084  $settings = new ilSetting('apache_auth');
1085  $settingsMap = $settings->getAll();
1086 
1087  $path = ILIAS_DATA_DIR . '/' . CLIENT_ID . '/apache_auth_allowed_domains.txt';
1088  if (file_exists($path) && is_readable($path)) {
1089  $settingsMap['apache_auth_domains'] = file_get_contents($path);
1090  }
1091 
1092  $form->setValuesByArray($settingsMap);
1093  }
1094  $this->tpl->setVariable('ADM_CONTENT', $form->getHtml());
1095  }
$path
Definition: ltiservices.php:29
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
const CLIENT_ID
Definition: constants.php:41
const ILIAS_DATA_DIR
Definition: constants.php:44
ilSetting $settings
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ authSettingsObject()

ilObjAuthSettingsGUI::authSettingsObject ( ?ILIAS\UI\Component\Input\Container\Form\Form  $auth_mode_determination_form = null,
?ILIAS\UI\Component\Input\Container\Form\Form  $registration_role_mapping_form = null 
)
private

Definition at line 61 of file class.ilObjAuthSettingsGUI.php.

References $server, ilAuthUtils\_getAllAuthModes(), ilObjUser\_getNumberOfUsersPerAuthMode(), ilAuthUtils\AUTH_APACHE, ilAuthUtils\AUTH_CAS, ilAuthUtils\AUTH_LDAP, ilAuthUtils\AUTH_LOCAL, ilAuthUtils\AUTH_OPENID_CONNECT, ilAuthUtils\AUTH_SAML, ilAuthUtils\AUTH_SHIBBOLETH, buildAuthModeDeterminationForm(), buildRegistrationRoleMappingForm(), ILIAS\Repository\ctrl(), ilSamlIdp\getIdpIdByAuthMode(), ilUtil\getImagePath(), ilOpenIdConnectSettings\getInstance(), ilSamlIdp\getInstanceByIdpId(), ilLDAPServer\getInstanceByServerId(), ilLDAPServer\getServerIdByAuthMode(), ILIAS\Repository\int(), ilLDAPServer\isAuthModeLDAP(), ilSamlIdp\isAuthModeSaml(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), null, setSubTabs(), and ILIAS\Repository\settings().

Referenced by updateAuthModeDeterminationObject(), updateRegistrationRoleMappingObject(), and viewObject().

64  : void {
65  if (!$this->rbac_system->checkAccess('visible,read', $this->object->getRefId())) {
66  $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
67  }
68 
69  $this->tabs_gui->setTabActive('authentication_settings');
70  $this->setSubTabs('authSettings');
71  $this->tabs_gui->setSubTabActive('auth_settings');
72 
73  $generalSettingsTpl = new ilTemplate('tpl.auth_general.html', true, true, 'components/ILIAS/Authentication');
74 
75  $generalSettingsTpl->setVariable('FORMACTION', $this->ctrl->getFormAction($this));
76 
77  $generalSettingsTpl->setVariable('TXT_AUTH_MODE', $this->lng->txt('auth_mode'));
78  $generalSettingsTpl->setVariable('TXT_AUTH_DEFAULT', $this->lng->txt('default'));
79  $generalSettingsTpl->setVariable('TXT_AUTH_ACTIVE', $this->lng->txt('active'));
80  $generalSettingsTpl->setVariable('TXT_AUTH_NUM_USERS', $this->lng->txt('num_users'));
81 
82  $generalSettingsTpl->setVariable('TXT_LOCAL', $this->lng->txt('auth_local'));
83  $generalSettingsTpl->setVariable('TXT_LDAP', $this->lng->txt('auth_ldap'));
84  $generalSettingsTpl->setVariable('TXT_SHIB', $this->lng->txt('auth_shib'));
85 
86  $generalSettingsTpl->setVariable('TXT_CAS', $this->lng->txt('auth_cas'));
87 
88  $generalSettingsTpl->setVariable('TXT_SCRIPT', $this->lng->txt('auth_script'));
89 
90  $generalSettingsTpl->setVariable('TXT_APACHE', $this->lng->txt('auth_apache'));
91 
93  $auth_modes = ilAuthUtils::_getAllAuthModes();
94  $valid_modes = [
102  ];
103 
104  $icon_ok = $this->ui_renderer->render(
105  $this->ui_factory->symbol()->icon()->custom(
106  ilUtil::getImagePath('standard/icon_ok.svg'),
107  $this->lng->txt('enabled')
108  )
109  );
110  $icon_not_ok = $this->ui_renderer->render(
111  $this->ui_factory->symbol()->icon()->custom(
112  ilUtil::getImagePath('standard/icon_not_ok.svg'),
113  $this->lng->txt('disabled')
114  )
115  );
116 
117  $this->logger->debug(print_r($auth_modes, true));
118  foreach ($auth_modes as $mode => $mode_name) {
119  if (!in_array($mode, $valid_modes, true) && !ilLDAPServer::isAuthModeLDAP(
120  (string) $mode
121  ) && !ilSamlIdp::isAuthModeSaml((string) $mode)) {
122  continue;
123  }
124 
125  $generalSettingsTpl->setCurrentBlock('auth_mode');
126 
127  if (ilLDAPServer::isAuthModeLDAP((string) $mode)) {
129  $generalSettingsTpl->setVariable('AUTH_NAME', $server->getName());
130  $generalSettingsTpl->setVariable('AUTH_ACTIVE', $server->isActive() ? $icon_ok : $icon_not_ok);
131  } elseif (ilSamlIdp::isAuthModeSaml((string) $mode)) {
133  $generalSettingsTpl->setVariable('AUTH_NAME', $idp->getEntityId());
134  $generalSettingsTpl->setVariable('AUTH_ACTIVE', $idp->isActive() ? $icon_ok : $icon_not_ok);
135  } elseif ($mode === ilAuthUtils::AUTH_OPENID_CONNECT) {
136  $generalSettingsTpl->setVariable('AUTH_NAME', $this->lng->txt('auth_' . $mode_name));
137  $generalSettingsTpl->setVariable(
138  'AUTH_ACTIVE',
139  ilOpenIdConnectSettings::getInstance()->getActive() ? $icon_ok : $icon_not_ok
140  );
141  } else {
142  $generalSettingsTpl->setVariable('AUTH_NAME', $this->lng->txt('auth_' . $mode_name));
143  $generalSettingsTpl->setVariable(
144  'AUTH_ACTIVE',
145  $this->ilias->getSetting(
146  $mode_name . '_active'
147  ) || (int) $mode === ilAuthUtils::AUTH_LOCAL ? $icon_ok : $icon_not_ok
148  );
149  }
150 
151  $auth_cnt_mode = $auth_cnt[$mode_name] ?? 0;
152  if ($this->settings->get('auth_mode') === (string) $mode) {
153  $generalSettingsTpl->setVariable('AUTH_CHECKED', 'checked="checked"');
154  $auth_cnt_default = $auth_cnt['default'] ?? 0;
155  $generalSettingsTpl->setVariable(
156  'AUTH_USER_NUM',
157  ((int) $auth_cnt_mode + $auth_cnt_default) . ' (' . $this->lng->txt('auth_per_default') .
158  ': ' . $auth_cnt_default . ')'
159  );
160  } else {
161  $generalSettingsTpl->setVariable(
162  'AUTH_USER_NUM',
163  (int) $auth_cnt_mode
164  );
165  }
166  $generalSettingsTpl->setVariable('AUTH_ID', $mode_name);
167  $generalSettingsTpl->setVariable('AUTH_VAL', $mode);
168  $generalSettingsTpl->parseCurrentBlock();
169  }
170 
171  $generalSettingsTpl->setVariable('TXT_CONFIGURE', $this->lng->txt('auth_configure'));
172 
173  if ($this->rbac_system->checkAccess('write', $this->object->getRefId())) {
174  $generalSettingsTpl->setVariable('TXT_AUTH_REMARK', $this->lng->txt('auth_remark_non_local_auth'));
175  $generalSettingsTpl->setCurrentBlock('auth_mode_submit');
176  $generalSettingsTpl->setVariable('TXT_SUBMIT', $this->lng->txt('save'));
177  $generalSettingsTpl->setVariable('CMD_SUBMIT', 'setAuthMode');
178  $generalSettingsTpl->parseCurrentBlock();
179  }
180 
181  $page_content = [
182  $this->ui_factory->panel()->standard(
183  $this->lng->txt('auth_select'),
184  $this->ui_factory->legacy()->content(implode('', [
185  $this->ui_renderer->render($this->ui_factory->messageBox()->info(
186  $this->lng->txt('auth_mode_default_change_info')
187  )),
188  $generalSettingsTpl->get()
189  ])),
190  )
191  ];
192 
193  $auth_mode_determination_form = $auth_mode_determination_form ?? $this->buildAuthModeDeterminationForm();
194  if ($auth_mode_determination_form !== null) {
195  $page_content[] = $this->ui_factory->panel()->standard(
196  $this->lng->txt('auth_auth_mode_determination'),
197  $auth_mode_determination_form
198  );
199  }
200 
201  $page_content[] = $this->ui_factory->panel()->standard(
202  $this->lng->txt('auth_active_roles'),
203  $registration_role_mapping_form ?? $this->buildRegistrationRoleMappingForm()
204  );
205 
206  $this->tpl->setContent(
207  $this->ui_renderer->render($page_content)
208  );
209  }
const AUTH_OPENID_CONNECT
static isAuthModeSaml(string $a_auth_mode)
static getInstanceByServerId(int $a_server_id)
Get instance by server id.
static getInstanceByIdpId(int $a_idp_id)
static getIdpIdByAuthMode(string $a_auth_mode)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static getServerIdByAuthMode(string $a_auth_mode)
Get auth id by auth mode.
static _getNumberOfUsersPerAuthMode()
get number of users per auth mode
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
Class ilObjForumAdministration.
static _getAllAuthModes()
static isAuthModeLDAP(string $a_auth_mode)
Check if user auth mode is LDAP.
$server
Definition: shib_login.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildAuthModeDeterminationForm()

ilObjAuthSettingsGUI::buildAuthModeDeterminationForm ( )
private

Definition at line 319 of file class.ilObjAuthSettingsGUI.php.

References $server, ilAuthModeDetermination\_getInstance(), ilAuthUtils\AUTH_APACHE, ilAuthUtils\AUTH_LOCAL, ilAuthUtils\AUTH_SOAP, ILIAS\Repository\ctrl(), ilAuthUtils\getAuthPlugins(), ilLDAPServer\getInstanceByServerId(), ilLDAPServer\getServerIdByAuthMode(), ILIAS\Repository\int(), ilLDAPServer\isAuthModeLDAP(), ILIAS\Repository\lng(), null, ILIAS\Repository\object(), ILIAS\Repository\refinery(), ilAuthModeDetermination\TYPE_AUTOMATIC, and ilAuthModeDetermination\TYPE_MANUAL.

Referenced by authSettingsObject(), and updateAuthModeDeterminationObject().

320  {
322  if ($det->getCountActiveAuthModes() <= 1) {
323  return null;
324  }
325 
326  $disabled_fields = !$this->rbac_system->checkAccess('write', $this->object->getRefId());
327 
328  $automatic_options = [];
329  $counter = 1;
330  $auth_sequenced = $det->getAuthModeSequence();
331  foreach ($auth_sequenced as $auth_mode) {
332  $text = '';
333  switch ($auth_mode) {
334  case ilLDAPServer::isAuthModeLDAP((string) $auth_mode):
335  $auth_id = ilLDAPServer::getServerIdByAuthMode($auth_mode);
337  $text = $server->getName();
338  break;
340  $text = $this->lng->txt('auth_local');
341  break;
343  $text = $this->lng->txt('auth_soap');
344  break;
346  $text = $this->lng->txt('auth_apache');
347  break;
348  default:
349  foreach (ilAuthUtils::getAuthPlugins() as $pl) {
350  $option = $pl->getMultipleAuthModeOptions($auth_mode);
351  $text = $option[$auth_mode]['txt'];
352  }
353  break;
354  }
355 
356  $automatic_options['m' . $auth_mode] = $this->ui_factory
357  ->input()
358  ->field()
359  ->numeric($text)
360  ->withDedicatedName('m' . $auth_mode)
361  ->withValue($counter++)
362  ->withDisabled($disabled_fields);
363  }
364 
365  $options = [
366  (string) ilAuthModeDetermination::TYPE_MANUAL => $this->ui_factory
367  ->input()
368  ->field()
369  ->group(
370  [],
371  $this->lng->txt('auth_by_user')
372  )
373  ->withDedicatedName((string) ilAuthModeDetermination::TYPE_MANUAL)
374  ->withDisabled($disabled_fields),
375  (string) ilAuthModeDetermination::TYPE_AUTOMATIC => $this->ui_factory
376  ->input()
377  ->field()
378  ->group(
379  $automatic_options,
380  $this->lng->txt('auth_automatic')
381  )
382  ->withDedicatedName((string) ilAuthModeDetermination::TYPE_AUTOMATIC)
383  ->withDisabled($disabled_fields)
384  ];
385 
386  $sections = [
387  self::PROP_AUTH_MODE_KIND => $this->ui_factory
388  ->input()
389  ->field()
390  ->switchableGroup(
391  $options,
392  $this->lng->txt('auth_kind_determination'),
393  $this->lng->txt('auth_mode_determination_info')
394  )
395  ->withDedicatedName(self::PROP_AUTH_MODE_KIND)
396  ->withValue((string) $det->getKind())
397  ->withDisabled($disabled_fields)
398  ->withRequired(true)
399  ];
400 
401  return $this->ui_factory
402  ->input()
403  ->container()
404  ->form()
405  ->standard($this->ctrl->getFormAction($this, 'updateAuthModeDetermination'), $sections)
406  ->withDedicatedName('auth_mode_determination')
407  ->withAdditionalTransformation(
408  $this->refinery->custom()->transformation(function ($value): array {
409  $auth_mode_kind = (int) ($value[self::PROP_AUTH_MODE_KIND][0] ?? ilAuthModeDetermination::TYPE_MANUAL);
410  $sequence = [];
411  if ($auth_mode_kind === ilAuthModeDetermination::TYPE_AUTOMATIC) {
412  $sequence = (array) ($value[self::PROP_AUTH_MODE_KIND][1] ?? []);
413  }
414 
415  $merged_values = array_merge(
416  [
417  self::PROP_AUTH_MODE_KIND => $auth_mode_kind,
418  ],
419  [
420  self::PROP_AUTH_MODE_SEQUENCE => $sequence
421  ]
422  );
423 
424  return $merged_values;
425  })
426  );
427  }
static getInstanceByServerId(int $a_server_id)
Get instance by server id.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static getAuthPlugins()
Get active enabled auth plugins.
static isAuthModeLDAP(string $a_auth_mode)
Check if user auth mode is LDAP.
$server
Definition: shib_login.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildRegistrationRoleMappingForm()

ilObjAuthSettingsGUI::buildRegistrationRoleMappingForm ( )
private

Definition at line 211 of file class.ilObjAuthSettingsGUI.php.

References ilObjectGUI\$id, $server, ilAuthUtils\_getActiveAuthModes(), ilAuthUtils\_getAuthModeName(), ilObjRole\_lookupRegisterAllowed(), ilAuthUtils\AUTH_LOCAL, ILIAS\Repository\ctrl(), ilSamlIdp\getIdpIdByAuthMode(), ilSamlIdp\getInstanceByIdpId(), ilLDAPServer\getInstanceByServerId(), ilLDAPServer\getServerIdByAuthMode(), ILIAS\Repository\lng(), null, and ILIAS\Repository\object().

Referenced by authSettingsObject(), and updateRegistrationRoleMappingObject().

212  {
213  $disabled_fields = !$this->rbac_system->checkAccess('write', $this->object->getRefId());
214 
215  $fields = [];
216  $reg_roles = ilObjRole::_lookupRegisterAllowed();
217 
218  $excluded_auth_names = ['default', 'cas', 'saml', 'shibboleth', 'ldap', 'apache', 'ecs', 'openid'];
219  // do not list auth modes with external login screen
220  // even not default, because it can easily be set to
221  // a non-working auth mode
222  $active_auth_modes = array_filter(
224  static fn(string $auth_name): bool => in_array($auth_name, $excluded_auth_names, true),
225  ARRAY_FILTER_USE_KEY
226  );
227 
228  foreach ($reg_roles as $role) {
229  $options = [];
230  $value = null;
231  foreach ($active_auth_modes as $auth_name => $auth_key) {
232  if ($auth_name === 'default') {
233  $name = $this->lng->txt('auth_' . $auth_name) . ' (' . $this->lng->txt(
234  'auth_' . ilAuthUtils::_getAuthModeName($auth_key)
235  ) . ')';
236  } elseif ($id = ilLDAPServer::getServerIdByAuthMode((string) $auth_key)) {
238  $name = $server->getName();
239  } elseif ($id = ilSamlIdp::getIdpIdByAuthMode((string) $auth_key)) {
241  $name = $idp->getEntityId();
242  } else {
243  $name = $this->lng->txt('auth_' . $auth_name);
244  }
245 
246  $options[$auth_name] = $name;
247 
248  if ($role['auth_mode'] === $auth_name) {
249  $value = $auth_name;
250  }
251  }
252 
253  if ($options === []) {
254  continue;
255  }
256 
257  $value = $value ?? ilAuthUtils::AUTH_LOCAL;
258 
259  $fields['r_' . $role['id']] = $this->ui_factory
260  ->input()
261  ->field()
262  ->select(
263  $role['title'],
264  $options,
265  $this->lng->txt('auth_role_auth_mode')
266  )
267  ->withRequired(true)
268  ->withValue($value)
269  ->withDedicatedName('r_' . $role['id'])
270  ->withDisabled($disabled_fields);
271  }
272 
273  return $this->ui_factory
274  ->input()
275  ->container()
276  ->form()
277  ->standard($this->ctrl->getFormAction($this, 'updateRegistrationRoleMapping'), $fields)
278  ->withDedicatedName('registration_role_mapping');
279  }
static _lookupRegisterAllowed()
get all roles that are activated in user registration
static getInstanceByServerId(int $a_server_id)
Get instance by server id.
static _getActiveAuthModes()
static getInstanceByIdpId(int $a_idp_id)
static getIdpIdByAuthMode(string $a_auth_mode)
static _getAuthModeName($a_auth_key)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static getServerIdByAuthMode(string $a_auth_mode)
Get auth id by auth mode.
$server
Definition: shib_login.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildSOAPForm()

ilObjAuthSettingsGUI::buildSOAPForm ( string  $submit_action)
private

Definition at line 559 of file class.ilObjAuthSettingsGUI.php.

References $namespace, $server, ILIAS\Repository\lng(), ILIAS\Repository\object(), ILIAS\Repository\refinery(), ILIAS\Repository\settings(), ILIAS\UI\Implementation\Component\Input\ViewControl\withAdditionalTransformation(), and ILIAS\UI\Implementation\Component\Input\withValue().

Referenced by editSOAPObject(), saveSOAPObject(), and testSoapAuthConnectionObject().

561  : \ILIAS\UI\Component\Input\Container\Form\Form {
562  $role_list = $this->rbac_review->getRolesByFilter(2, $this->object->getId());
563  $roles = [];
564 
565  foreach ($role_list as $role) {
566  $roles[$role['obj_id']] = $role['title'];
567  }
568 
569  $active = $this->ui_factory
570  ->input()
571  ->field()
572  ->checkbox($this->lng->txt('active'))
573  ->withValue((bool) $this->settings->get('soap_auth_active', ''));
574 
575  $server = $this->ui_factory
576  ->input()
577  ->field()
578  ->text(
579  $this->lng->txt('server'),
580  $this->lng->txt('auth_soap_server_desc')
581  )
582  ->withMaxLength(256)
583  ->withRequired(true)
584  ->withValue($this->settings->get('soap_auth_server', ''));
585 
586  $port = $this->ui_factory
587  ->input()
588  ->field()
589  ->numeric(
590  $this->lng->txt('port'),
591  $this->lng->txt('auth_soap_port_desc')
592  )
593  ->withAdditionalTransformation($this->refinery->int()->isGreaterThan(0))
595  $this->refinery->int()->isLessThan(65536)
596  )
597  ->withValue((int) $this->settings->get('soap_auth_port', '0'));
598 
599  $use_https = $this->ui_factory
600  ->input()
601  ->field()
602  ->checkbox($this->lng->txt('auth_soap_use_https'))
603  ->withValue((bool) $this->settings->get('soap_auth_use_https', ''));
604 
605  $uri = $this->ui_factory
606  ->input()
607  ->field()
608  ->text(
609  $this->lng->txt('uri'),
610  $this->lng->txt('auth_soap_uri_desc')
611  )
612  ->withMaxLength(256)
613  ->withValue($this->settings->get('soap_auth_uri', ''));
614 
615  $namespace = $this->ui_factory
616  ->input()
617  ->field()
618  ->text(
619  $this->lng->txt('auth_soap_namespace'),
620  $this->lng->txt('auth_soap_namespace_desc')
621  )
622  ->withMaxLength(256)
623  ->withValue($this->settings->get('soap_auth_namespace', ''));
624 
625  $dotnet = $this->ui_factory
626  ->input()
627  ->field()
628  ->checkbox($this->lng->txt('auth_soap_use_dotnet'))
629  ->withValue((bool) $this->settings->get('soap_auth_use_dotnet', ''));
630 
631  $createuser = $this->ui_factory
632  ->input()
633  ->field()
634  ->checkbox(
635  $this->lng->txt('auth_create_users'),
636  $this->lng->txt('auth_soap_create_users_desc')
637  )
638  ->withValue((bool) $this->settings->get('soap_auth_create_users', ''));
639 
640  $sendmail = $this->ui_factory
641  ->input()
642  ->field()
643  ->checkbox(
644  $this->lng->txt('user_send_new_account_mail'),
645  $this->lng->txt('auth_new_account_mail_desc')
646  )
647  ->withValue((bool) $this->settings->get('soap_auth_account_mail', ''));
648 
649  $defaultrole = $this->ui_factory
650  ->input()
651  ->field()
652  ->select(
653  $this->lng->txt('auth_user_default_role'),
654  $roles,
655  $this->lng->txt('auth_soap_user_default_role_desc')
656  )
657  ->withValue($this->settings->get('soap_auth_user_default_role', '4'))
658  ->withAdditionalTransformation($this->refinery->int()->isGreaterThan(0));
659 
660  $allowlocal = $this->ui_factory
661  ->input()
662  ->field()
663  ->checkbox(
664  $this->lng->txt('auth_allow_local'),
665  $this->lng->txt('auth_soap_allow_local_desc')
666  )
667  ->withValue((bool) $this->settings->get('soap_auth_user_default_role', ''));
668 
669  $form = $this->ui_factory->input()->container()->form()->standard(
670  $submit_action,
671  [
672  'active' => $active,
673  'server' => $server,
674  'port' => $port,
675  'use_https' => $use_https,
676  'uri' => $uri,
677  'namespace' => $namespace,
678  'dotnet' => $dotnet,
679  'createuser' => $createuser,
680  'sendmail' => $sendmail,
681  'defaultrole' => $defaultrole,
682  'allowlocal' => $allowlocal
683  ]
684  );
685  return $form;
686  }
if($err=$client->getError()) $namespace
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:61
$server
Definition: shib_login.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildSOAPTestForm()

ilObjAuthSettingsGUI::buildSOAPTestForm ( string  $submit_action)
private

Definition at line 688 of file class.ilObjAuthSettingsGUI.php.

References $ext_uid, $new_user, and $soap_pw.

Referenced by editSOAPObject(), saveSOAPObject(), and testSoapAuthConnectionObject().

690  : \ILIAS\UI\Component\Input\Container\Form\Form {
691  $ext_uid = $this->ui_factory->input()->field()->text(
692  'ext_uid'
693  );
694  $soap_pw = $this->ui_factory->input()->field()->text(
695  'soap_pw'
696  );
697  $new_user = $this->ui_factory->input()->field()
698  ->checkbox('new_user');
699  return $this->ui_factory->input()->container()->form()->standard(
700  $submit_action,
701  [
702  'ext_uid' => $ext_uid,
703  'soap_pw' => $soap_pw,
704  'new_user' => $new_user
705  ]
706  )->withSubmitLabel('Send');
707  }
$ext_uid
$soap_pw
$new_user
+ Here is the caller graph for this function:

◆ cancelObject()

ilObjAuthSettingsGUI::cancelObject ( )

Definition at line 484 of file class.ilObjAuthSettingsGUI.php.

References ILIAS\Repository\ctrl().

484  : void
485  {
486  $this->ctrl->redirect($this, 'authSettings');
487  }
+ Here is the call graph for this function:

◆ editScriptObject()

ilObjAuthSettingsGUI::editScriptObject ( )

Definition at line 781 of file class.ilObjAuthSettingsGUI.php.

References ilObjectGUI\$settings, ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

781  : void
782  {
783  if (!$this->rbac_system->checkAccess('write', $this->object->getRefId())) {
784  $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
785  }
786 
787  if ($_SESSION['error_post_vars']) {
788  $this->tpl->setVariable('AUTH_SCRIPT_NAME', $_SESSION['error_post_vars']['auth_script']['name']);
789  } else {
790  $settings = $this->ilias->getAllSettings();
791 
792  $this->tpl->setVariable('AUTH_SCRIPT_NAME', $settings['auth_script_name']);
793  }
794 
795  $this->tabs_gui->setTabActive('auth_script');
796 
797  $this->tpl->addBlockFile(
798  'ADM_CONTENT',
799  'adm_content',
800  'tpl.auth_script.html',
801  'components/ILIAS/Authentication'
802  );
803 
804  $this->tpl->setVariable('FORMACTION', $this->ctrl->getFormAction($this));
805  $this->tpl->setVariable('COLSPAN', 3);
806  $this->tpl->setVariable('TXT_AUTH_SCRIPT_TITLE', $this->lng->txt('auth_script_configure'));
807  $this->tpl->setVariable('TXT_OPTIONS', $this->lng->txt('options'));
808  $this->tpl->setVariable('TXT_AUTH_SCRIPT_NAME', $this->lng->txt('auth_script_name'));
809 
810  $this->tpl->setVariable('TXT_REQUIRED_FLD', $this->lng->txt('required_field'));
811  $this->tpl->setVariable('TXT_CANCEL', $this->lng->txt('cancel'));
812  $this->tpl->setVariable('TXT_SUBMIT', $this->lng->txt('save'));
813  $this->tpl->setVariable('CMD_SUBMIT', 'saveScript');
814  }
Class ilObjForumAdministration.
ilSetting $settings
+ Here is the call graph for this function:

◆ editSOAPObject()

ilObjAuthSettingsGUI::editSOAPObject ( )

Definition at line 709 of file class.ilObjAuthSettingsGUI.php.

References buildSOAPForm(), buildSOAPTestForm(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

709  : void
710  {
711  if (!$this->rbac_system->checkAccess('read', $this->object->getRefId())) {
712  $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
713  }
714 
715  $soap_form = $this->buildSOAPForm($this->ctrl->getFormAction($this, 'saveSOAP'));
716  $test_form = $this->buildSOAPTestForm($this->ctrl->getFormAction($this, 'testSoapAuthConnection'));
717 
718  $this->tabs_gui->setTabActive('auth_soap');
719  $panel = $this->ui_factory->panel()->standard('SOAP', [$soap_form, $test_form]);
720  $this->tpl->setContent($this->ui_renderer->render($panel));
721  }
buildSOAPTestForm(string $submit_action)
buildSOAPForm(string $submit_action)
Class ilObjForumAdministration.
+ Here is the call graph for this function:

◆ executeCommand()

ilObjAuthSettingsGUI::executeCommand ( )

Definition at line 846 of file class.ilObjAuthSettingsGUI.php.

References ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), null, ILIAS\Repository\object(), ilObjectGUI\prepareOutput(), setSubTabs(), and ilObjectGUI\setTitleAndDescription().

846  : void
847  {
848  $next_class = $this->ctrl->getNextClass($this) ?? '';
849  $cmd = $this->ctrl->getCmd() ?? '';
850  $this->prepareOutput();
851 
852  if (!$this->rbac_system->checkAccess('visible,read', $this->object->getRefId())) {
853  $this->error->raiseError($this->lng->txt('msg_no_perm_read'), $this->error->WARNING);
854  }
855 
856  switch ($next_class) {
857  case 'ilopenidconnectsettingsgui':
858  $this->tabs_gui->activateTab('auth_oidconnect');
859 
860  $oid = new ilOpenIdConnectSettingsGUI($this->object->getRefId());
861  $this->ctrl->forwardCommand($oid);
862  break;
863 
864  case 'ilsamlsettingsgui':
865  $this->tabs_gui->setTabActive('auth_saml');
866 
867  $os = new ilSamlSettingsGUI($this->object->getRefId());
868  $this->ctrl->forwardCommand($os);
869  break;
870 
871  case 'ilregistrationsettingsgui':
872  $this->tabs_gui->setTabActive('registration_settings');
873 
874  $registration_gui = new ilRegistrationSettingsGUI();
875  $this->ctrl->forwardCommand($registration_gui);
876  break;
877 
878  case 'ilpermissiongui':
879  $this->tabs_gui->setTabActive('perm_settings');
880 
881  $perm_gui = new ilPermissionGUI($this);
882  $this->ctrl->forwardCommand($perm_gui);
883  break;
884 
885  case 'illdapsettingsgui':
886  $this->tabs_gui->setTabActive('auth_ldap');
887 
888  $ldap_settings_gui = new ilLDAPSettingsGUI($this->object->getRefId());
889  $this->ctrl->forwardCommand($ldap_settings_gui);
890  break;
891 
892  case 'ilauthshibbolethsettingsgui':
893  $this->tabs_gui->setTabActive('auth_shib');
894 
895  $shib_settings_gui = new ilAuthShibbolethSettingsGUI($this->object->getRefId());
896  $this->ctrl->forwardCommand($shib_settings_gui);
897  break;
898 
899  case 'ilcassettingsgui':
900  $this->tabs_gui->setTabActive('auth_cas');
901 
902  $cas_settings = new ilCASSettingsGUI($this->object->getRefId());
903  $this->ctrl->forwardCommand($cas_settings);
904  break;
905 
906  case strtolower(ilAuthPageEditorGUI::class):
907  $this->setSubTabs('authSettings');
908  $this->tabs_gui->setTabActive('authentication_settings');
909  $this->tabs_gui->setSubTabActive('auth_login_editor');
910 
911  $lpe = new ilAuthPageEditorGUI($this->object->getRefId());
912  $this->ctrl->forwardCommand($lpe);
913  break;
914 
915  case strtolower(ilObjectContentStyleSettingsGUI::class):
916  $this->checkPermission('write');
917  $this->setTitleAndDescription();
918  $this->setSubTabs('authSettings');
919  $this->tabs_gui->activateTab('authentication_settings');
920  $this->tabs_gui->activateSubTab('style');
921 
922  $settings_gui = $this->content_style_gui
923  ->objectSettingsGUIForRefId(
924  null,
925  $this->object->getRefId()
926  );
927  $this->ctrl->forwardCommand($settings_gui);
928  break;
929 
930  case strtolower(ilAuthLogoutBehaviourGUI::class):
931  $this->setSubTabs('authSettings');
932  $this->tabs_gui->setTabActive('authentication_settings');
933  $this->tabs_gui->setSubTabActive('logout_behaviour');
934 
935  $gui = new ilAuthLogoutBehaviourGUI();
936  $this->ctrl->forwardCommand($gui);
937  break;
938 
939  default:
940  if (!$cmd) {
941  $cmd = 'authSettings';
942  }
943  $cmd .= 'Object';
944  $this->$cmd();
945 
946  break;
947  }
948  }
Class ilAuthShibbolethSettingsGUI.
prepareOutput(bool $show_sub_objects=true)
ilAuthLogoutBehaviourGUI: ilObjAuthSettingsGUI ilAuthLogoutBehaviourGUI: ilLoginPageGUI ...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
ilAuthPageEditorGUI: ilObjAuthSettingsGUI ilAuthPageEditorGUI: ilLoginPageGUI, ilLogoutPageGUI ...
Class ilRegistrationSettingsGUI.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjAuthSettingsGUI::getAdminTabs ( )

Definition at line 950 of file class.ilObjAuthSettingsGUI.php.

References getTabs().

950  : void
951  {
952  $this->getTabs();
953  }
+ Here is the call graph for this function:

◆ getApacheAuthSettingsForm()

ilObjAuthSettingsGUI::getApacheAuthSettingsForm ( )

Definition at line 1145 of file class.ilObjAuthSettingsGUI.php.

References $txt, ilObject\_lookupTitle(), ILIAS\Repository\access(), ilAuthUtils\AUTH_APACHE, ILIAS\Repository\ctrl(), ilLDAPServer\getDataSource(), ilLDAPServer\getServerIds(), ILIAS\Repository\lng(), ilRadioOption\setDisabled(), and ilSelectInputGUI\setOptions().

Referenced by apacheAuthSettingsObject(), and saveApacheSettingsObject().

1146  {
1147  $form = new ilPropertyFormGUI();
1148  $form->setFormAction($this->ctrl->getFormAction($this));
1149  $form->setTitle($this->lng->txt('apache_settings'));
1150 
1151  $chb_enabled = new ilCheckboxInputGUI($this->lng->txt('apache_enable_auth'), 'apache_enable_auth');
1152  $chb_enabled->setValue('1');
1153  $form->addItem($chb_enabled);
1154 
1155  $chb_local_create_account = new ilCheckboxInputGUI(
1156  $this->lng->txt('apache_autocreate'),
1157  'apache_local_autocreate'
1158  );
1159  $chb_local_create_account->setValue('1');
1160  $chb_enabled->addSubitem($chb_local_create_account);
1161 
1162  $roles = $this->rbac_review->getGlobalRolesArray();
1163  $select = new ilSelectInputGUI($this->lng->txt('apache_default_role'), 'apache_default_role');
1164  $roleOptions = [];
1165  foreach ($roles as $role) {
1166  $roleOptions[$role['obj_id']] = ilObject::_lookupTitle($role['obj_id']);
1167  }
1168  $select->setOptions($roleOptions);
1169  $select->setValue(4);
1170 
1171  $chb_local_create_account->addSubitem($select);
1172 
1173  $chb_local = new ilCheckboxInputGUI($this->lng->txt('apache_enable_local'), 'apache_enable_local');
1174  $chb_local->setValue('1');
1175  $form->addItem($chb_local);
1176 
1177  $chb_ldap = new ilCheckboxInputGUI($this->lng->txt('apache_enable_ldap'), 'apache_enable_ldap');
1178  $chb_local->setValue('1');
1179 
1180  $chb_ldap->setInfo($this->lng->txt('apache_ldap_hint_ldap_must_be_configured'));
1181 
1182  $this->lng->loadLanguageModule('auth');
1183 
1184  $servers = ilLDAPServer::getServerIds();
1185  if (count($servers)) {
1186  $ldap_server_select = new ilSelectInputGUI($this->lng->txt('auth_ldap_server_ds'), 'apache_ldap_sid');
1187  $options[0] = $this->lng->txt('select_one');
1188  foreach ($servers as $server_id) {
1189  $ldap_server = new ilLDAPServer($server_id);
1190  $options[$server_id] = $ldap_server->getName();
1191  }
1192  $ldap_server_select->setOptions($options);
1193  $ldap_server_select->setRequired(true);
1194 
1196  $ldap_server_select->setValue($ds);
1197 
1198  $chb_ldap->addSubItem($ldap_server_select);
1199  }
1200  $form->addItem($chb_ldap);
1201 
1202  $txt = new ilTextInputGUI($this->lng->txt('apache_auth_indicator_name'), 'apache_auth_indicator_name');
1203  $txt->setRequired(true);
1204  $form->addItem($txt);
1205 
1206  $txt = new ilTextInputGUI($this->lng->txt('apache_auth_indicator_value'), 'apache_auth_indicator_value');
1207  $txt->setRequired(true);
1208  $form->addItem($txt);
1209 
1210  $chb = new ilCheckboxInputGUI(
1211  $this->lng->txt('apache_auth_enable_override_login'),
1212  'apache_auth_enable_override_login_page'
1213  );
1214  $chb->setValue('1');
1215  $form->addItem($chb);
1216 
1217  $txt = new ilTextInputGUI(
1218  $this->lng->txt('apache_auth_target_override_login'),
1219  'apache_auth_target_override_login_page'
1220  );
1221  $txt->setRequired(true);
1222  $chb->addSubItem($txt);
1223 
1224  $chb = new ilCheckboxInputGUI(
1225  $this->lng->txt('apache_auth_authenticate_on_login_page'),
1226  'apache_auth_authenticate_on_login_page'
1227  );
1228  $chb->setValue('1');
1229  $form->addItem($chb);
1230 
1231  $sec = new ilFormSectionHeaderGUI();
1232  $sec->setTitle($this->lng->txt('apache_auth_username_config'));
1233  $form->addItem($sec);
1234 
1235  $rag = new ilRadioGroupInputGUI(
1236  $this->lng->txt('apache_auth_username_config_type'),
1237  'apache_auth_username_config_type'
1238  );
1239  $form->addItem($rag);
1240 
1241  $rao = new ilRadioOption($this->lng->txt('apache_auth_username_direct_mapping'), '1');
1242  $rag->addOption($rao);
1243 
1244  $txt = new ilTextInputGUI(
1245  $this->lng->txt('apache_auth_username_direct_mapping_fieldname'),
1246  'apache_auth_username_direct_mapping_fieldname'
1247  );
1248  $rao->addSubItem($txt);
1249 
1250  $rao = new ilRadioOption($this->lng->txt('apache_auth_username_extended_mapping'), '2');
1251  $rao->setDisabled(true);
1252  $rag->addOption($rao);
1253 
1254  $rao = new ilRadioOption($this->lng->txt('apache_auth_username_by_function'), '3');
1255  $rag->addOption($rao);
1256 
1257  $sec = new ilFormSectionHeaderGUI();
1258  $sec->setTitle($this->lng->txt('apache_auth_security'));
1259  $form->addItem($sec);
1260 
1261  $txt = new ilTextAreaInputGUI($this->lng->txt('apache_auth_domains'), 'apache_auth_domains');
1262  $txt->setInfo($this->lng->txt('apache_auth_domains_description'));
1263 
1264  $form->addItem($txt);
1265 
1266  if ($this->access->checkAccess('write', '', $this->ref_id)) {
1267  $form->addCommandButton('saveApacheSettings', $this->lng->txt('save'));
1268  }
1269  $form->addCommandButton('cancel', $this->lng->txt('cancel'));
1270 
1271  return $form;
1272  }
This class represents an option in a radio group.
static getDataSource(int $a_auth_mode)
This class represents a selection list property in a property form.
setDisabled(bool $a_disabled)
setOptions(array $a_options)
This class represents a property in a property form.
static getServerIds()
Get all server ids.
static _lookupTitle(int $obj_id)
$txt
Definition: error.php:31
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAuthModeTitle()

ilObjAuthSettingsGUI::getAuthModeTitle ( )
private

Definition at line 833 of file class.ilObjAuthSettingsGUI.php.

References ilAuthUtils\AUTH_APACHE, ilAuthUtils\AUTH_LDAP, ilAuthUtils\AUTH_LOCAL, ilAuthUtils\AUTH_SAML, ilAuthUtils\AUTH_SCRIPT, ilAuthUtils\AUTH_SHIBBOLETH, and ILIAS\Repository\lng().

Referenced by saveScriptObject(), and setAuthModeObject().

833  : string
834  {
835  return match ((int) $this->ilias->getSetting('auth_mode')) {
836  ilAuthUtils::AUTH_LOCAL => $this->lng->txt('auth_local'),
837  ilAuthUtils::AUTH_LDAP => $this->lng->txt('auth_ldap'),
838  ilAuthUtils::AUTH_SHIBBOLETH => $this->lng->txt('auth_shib'),
839  ilAuthUtils::AUTH_SAML => $this->lng->txt('auth_saml'),
840  ilAuthUtils::AUTH_SCRIPT => $this->lng->txt('auth_script'),
841  ilAuthUtils::AUTH_APACHE => $this->lng->txt('auth_apache'),
842  default => $this->lng->txt('unknown'),
843  };
844  }
Class ilObjForumAdministration.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTabs()

ilObjAuthSettingsGUI::getTabs ( )
protected

Definition at line 955 of file class.ilObjAuthSettingsGUI.php.

References ILIAS\Repository\ctrl(), ilSamlSettingsGUI\DEFAULT_CMD, ILIAS\Repository\lng(), and ILIAS\Repository\object().

Referenced by getAdminTabs().

955  : void
956  {
957  $this->ctrl->setParameter($this, 'ref_id', $this->object->getRefId());
958 
959  if ($this->rbac_system->checkAccess('visible,read', $this->object->getRefId())) {
960  $this->tabs_gui->addTarget(
961  'authentication_settings',
962  $this->ctrl->getLinkTarget($this, 'authSettings'),
963  '',
964  '',
965  ''
966  );
967 
968  $this->tabs_gui->addTarget(
969  'registration_settings',
970  $this->ctrl->getLinkTargetByClass('ilregistrationsettingsgui', 'view')
971  );
972 
973  $this->tabs_gui->addTarget(
974  'auth_ldap',
975  $this->ctrl->getLinkTargetByClass('illdapsettingsgui', 'serverList'),
976  '',
977  '',
978  ''
979  );
980 
981  $this->tabs_gui->addTarget(
982  'auth_shib',
983  $this->ctrl->getLinkTargetByClass('ilauthshibbolethsettingsgui', 'settings')
984  );
985 
986  $this->tabs_gui->addTarget(
987  'auth_cas',
988  $this->ctrl->getLinkTargetByClass('ilcassettingsgui', 'settings')
989  );
990 
991  $this->tabs_gui->addTarget(
992  'auth_soap',
993  $this->ctrl->getLinkTarget($this, 'editSOAP'),
994  '',
995  '',
996  ''
997  );
998 
999  $this->tabs_gui->addTarget(
1000  'apache_auth_settings',
1001  $this->ctrl->getLinkTarget($this, 'apacheAuthSettings'),
1002  '',
1003  '',
1004  ''
1005  );
1006 
1007  $this->tabs_gui->addTarget(
1008  'auth_saml',
1009  $this->ctrl->getLinkTargetByClass('ilsamlsettingsgui', ilSamlSettingsGUI::DEFAULT_CMD),
1010  '',
1011  '',
1012  ''
1013  );
1014 
1015  $this->tabs_gui->addTab(
1016  'auth_oidconnect',
1017  $this->lng->txt('auth_oidconnect'),
1018  $this->ctrl->getLinkTargetByClass('ilopenidconnectsettingsgui')
1019  );
1020  }
1021 
1022  if ($this->rbac_system->checkAccess('edit_permission', $this->object->getRefId())) {
1023  $this->tabs_gui->addTarget(
1024  'perm_settings',
1025  $this->ctrl->getLinkTargetByClass([get_class($this), 'ilpermissiongui'], 'perm'),
1026  ['perm', 'info', 'owner'],
1027  'ilpermissiongui'
1028  );
1029  }
1030  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ registrationSettingsObject()

ilObjAuthSettingsGUI::registrationSettingsObject ( )

Definition at line 1279 of file class.ilObjAuthSettingsGUI.php.

References ILIAS\Repository\ctrl().

1279  : void
1280  {
1281  $registration_gui = new ilRegistrationSettingsGUI();
1282  $this->ctrl->redirect($registration_gui);
1283  }
Class ilRegistrationSettingsGUI.
+ Here is the call graph for this function:

◆ saveApacheSettingsObject()

ilObjAuthSettingsGUI::saveApacheSettingsObject ( )

Definition at line 1097 of file class.ilObjAuthSettingsGUI.php.

References $DIC, $ilSetting, ilObjectGUI\$settings, apacheAuthSettingsObject(), ilAuthUtils\AUTH_APACHE, ilAuthUtils\AUTH_LOCAL, CLIENT_ID, ILIAS\Repository\ctrl(), getApacheAuthSettingsForm(), ILIAS_DATA_DIR, ILIAS\Repository\lng(), ilSetting\set(), and validateApacheAuthAllowedDomains().

1097  : void
1098  {
1099  $form = $this->getApacheAuthSettingsForm();
1100  $form->setValuesByPost();
1101  if ($form->checkInput()) {
1102  $settings = new ilSetting('apache_auth');
1103  $fields = [
1104  'apache_auth_indicator_name',
1105  'apache_auth_indicator_value',
1106  'apache_enable_auth',
1107  'apache_enable_local',
1108  'apache_local_autocreate',
1109  'apache_enable_ldap',
1110  'apache_auth_username_config_type',
1111  'apache_auth_username_direct_mapping_fieldname',
1112  'apache_default_role',
1113  'apache_auth_target_override_login_page',
1114  'apache_auth_enable_override_login_page',
1115  'apache_auth_authenticate_on_login_page',
1116  'apache_ldap_sid'
1117  ];
1118 
1119  foreach ($fields as $field) {
1120  $settings->set($field, (string) $form->getInput($field));
1121  }
1122 
1123  if ($form->getInput('apache_enable_auth')) {
1124  $this->ilias->setSetting('apache_active', '1');
1125  } else {
1126  $this->ilias->setSetting('apache_active', '0');
1127  global $DIC;
1128 
1129  $ilSetting = $DIC['ilSetting'];
1130  if ((int) $ilSetting->get('auth_mode', '0') === ilAuthUtils::AUTH_APACHE) {
1131  $ilSetting->set('auth_mode', (string) ilAuthUtils::AUTH_LOCAL);
1132  }
1133  }
1134 
1135  $allowedDomains = $this->validateApacheAuthAllowedDomains((string) $form->getInput('apache_auth_domains'));
1136  file_put_contents(ILIAS_DATA_DIR . '/' . CLIENT_ID . '/apache_auth_allowed_domains.txt', $allowedDomains);
1137 
1138  $this->tpl->setOnScreenMessage('success', $this->lng->txt('apache_settings_changed_success'), true);
1139  $this->ctrl->redirect($this, 'apacheAuthSettings');
1140  } else {
1141  $this->apacheAuthSettingsObject($form);
1142  }
1143  }
set(string $a_key, string $a_val)
apacheAuthSettingsObject(?ilPropertyFormGUI $form=null)
const CLIENT_ID
Definition: constants.php:41
global $DIC
Definition: shib_login.php:22
Class ilObjForumAdministration.
const ILIAS_DATA_DIR
Definition: constants.php:44
global $ilSetting
Definition: privfeed.php:31
ilSetting $settings
+ Here is the call graph for this function:

◆ saveScriptObject()

ilObjAuthSettingsGUI::saveScriptObject ( )

Definition at line 816 of file class.ilObjAuthSettingsGUI.php.

References ilAuthUtils\AUTH_SCRIPT, ILIAS\Repository\ctrl(), getAuthModeTitle(), and ILIAS\Repository\lng().

816  : void
817  {
818  if (!$_POST['auth_script']['name']) {
819  $this->ilias->raiseError($this->lng->txt('fill_out_all_required_fields'), $this->ilias->error_obj->MESSAGE);
820  }
821 
822  $this->ilias->setSetting('auth_script_name', $_POST['auth_script']['name']);
823  $this->ilias->setSetting('auth_mode', (string) ilAuthUtils::AUTH_SCRIPT);
824 
825  $this->tpl->setOnScreenMessage(
826  'success',
827  $this->lng->txt('auth_mode_changed_to') . ' ' . $this->getAuthModeTitle(),
828  true
829  );
830  $this->ctrl->redirect($this, 'editScript');
831  }
Class ilObjForumAdministration.
+ Here is the call graph for this function:

◆ saveSOAPObject()

ilObjAuthSettingsGUI::saveSOAPObject ( )

Definition at line 746 of file class.ilObjAuthSettingsGUI.php.

References buildSOAPForm(), buildSOAPTestForm(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), and ILIAS\Repository\settings().

746  : void
747  {
748  if (!$this->rbac_system->checkAccess('write', $this->object->getRefId())) {
749  $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
750  }
751 
752  $soap_form = $this->buildSOAPForm($this->ctrl->getFormAction($this, 'saveSOAP'));
753  $test_form = $this->buildSOAPTestForm($this->ctrl->getFormAction($this, 'testSoapAuthConnection'));
754  if ($this->request->getMethod() === 'POST') {
755  $soap_form = $soap_form->withRequest($this->request);
756  $result = $soap_form->getData();
757  if (!is_null($result)) {
758  $this->settings->set('soap_auth_active', (string) $result['active']);
759  $this->settings->set('soap_auth_server', $result['server']);
760  $this->settings->set('soap_auth_port', (string) $result['port']);
761  $this->settings->set('soap_auth_use_https', (string) $result['use_https']);
762  $this->settings->set('soap_auth_uri', $result['uri']);
763  $this->settings->set('soap_auth_namespace', $result['namespace']);
764  $this->settings->set('soap_auth_use_dotnet', (string) $result['dotnet']);
765  $this->settings->set('soap_auth_create_users', (string) $result['createuser']);
766  $this->settings->set('soap_auth_account_mail', (string) $result['sendmail']);
767  $this->settings->set('soap_auth_user_default_role', (string) $result['defaultrole']);
768  $this->settings->set('soap_auth_allow_local', (string) $result['allowlocal']);
769 
770  $this->tpl->setOnScreenMessage('success', $this->lng->txt('auth_soap_settings_saved'), true);
771  $this->logger->info('data' . print_r($result, true));
772  $this->ctrl->redirect($this, 'editSOAP');
773  }
774  }
775 
776  $this->tabs_gui->setTabActive('auth_soap');
777  $panel = $this->ui_factory->panel()->standard('SOAP', [$soap_form, $test_form]);
778  $this->tpl->setContent($this->ui_renderer->render($panel));
779  }
buildSOAPTestForm(string $submit_action)
buildSOAPForm(string $submit_action)
Class ilObjForumAdministration.
+ Here is the call graph for this function:

◆ setAuthModeObject()

ilObjAuthSettingsGUI::setAuthModeObject ( )

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

References ilAuthUtils\AUTH_SAML, ilAuthUtils\AUTH_SCRIPT, ilAuthUtils\AUTH_SHIBBOLETH, ILIAS\Repository\ctrl(), getAuthModeTitle(), ilObjectGUI\getReturnLocation(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), ILIAS\Repository\object(), ilUtil\redirect(), ILIAS\Repository\refinery(), and ILIAS\Repository\settings().

489  : void
490  {
491  if (!$this->rbac_system->checkAccess('write', $this->object->getRefId())) {
492  $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
493  }
494  $this->logger->debug('auth mode available:' . $this->request_wrapper->has('auth_mode'));
495 
496  if (!$this->http->wrapper()->post()->has('auth_mode')) {
497  $this->ilias->raiseError($this->lng->txt('auth_err_no_mode_selected'), $this->ilias->error_obj->MESSAGE);
498  }
499  $new_auth_mode = $this->http->wrapper()->post()->retrieve('auth_mode', $this->refinery->to()->string());
500  $this->logger->debug('auth mode:' . $new_auth_mode);
501  $current_auth_mode = $this->settings->get('auth_mode', '');
502  if ($new_auth_mode === $current_auth_mode) {
503  $this->tpl->setOnScreenMessage(
504  'info',
505  $this->lng->txt('auth_mode') . ': ' . $this->getAuthModeTitle() . ' ' . $this->lng->txt(
506  'auth_mode_not_changed'
507  ),
508  true
509  );
510  $this->ctrl->redirect($this, 'authSettings');
511  }
512 
513  switch ((int) $new_auth_mode) {
515  break;
516 
517  // @fix changed from AUTH_SHIB > is not defined
519  if ($this->object->checkAuthSHIB() !== true) {
520  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('auth_shib_not_configured'), true);
522  $this->getReturnLocation(
523  'authSettings',
524  $this->ctrl->getLinkTargetByClass(
525  ilAuthShibbolethSettingsGUI::class,
526  'settings',
527  '',
528  false,
529  false
530  )
531  )
532  );
533  }
534  break;
535 
537  if ($this->object->checkAuthScript() !== true) {
538  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('auth_script_not_configured'), true);
540  $this->getReturnLocation(
541  'authSettings',
542  $this->ctrl->getLinkTarget($this, 'editScript', '', false, false)
543  )
544  );
545  }
546  break;
547  }
548 
549  $this->ilias->setSetting('auth_mode', $new_auth_mode);
550 
551  $this->tpl->setOnScreenMessage(
552  'success',
553  $this->lng->txt('auth_default_mode_changed_to') . ' ' . $this->getAuthModeTitle(),
554  true
555  );
556  $this->ctrl->redirect($this, 'authSettings');
557  }
static http()
Fetches the global http state from ILIAS.
Class ilObjForumAdministration.
static redirect(string $a_script)
getReturnLocation(string $cmd, string $default_location="")
Get return location for command (command is method name without "Object", e.g.
+ Here is the call graph for this function:

◆ setSubTabs()

ilObjAuthSettingsGUI::setSubTabs ( string  $a_tab)

Definition at line 1032 of file class.ilObjAuthSettingsGUI.php.

References ILIAS\Repository\access(), ilAuthPageEditorGUI\CONTEXT_HTTP_PARAM, ILIAS\Repository\ctrl(), ilAuthPageEditorGUI\DEFAULT_COMMAND, ILIAS\Repository\lng(), and null.

Referenced by authSettingsObject(), and executeCommand().

1032  : void
1033  {
1034  $this->lng->loadLanguageModule('auth');
1035 
1036  if ($a_tab === 'authSettings' && $this->access->checkAccess('write', '', $this->object->getRefId())) {
1037  $this->tabs_gui->addSubTabTarget(
1038  'auth_settings',
1039  $this->ctrl->getLinkTarget($this, 'authSettings'),
1040  ''
1041  );
1042 
1043  foreach (AuthPageEditorContext::cases() as $auth_ipe_context) {
1044  $this->ctrl->setParameterByClass(
1045  ilAuthPageEditorGUI::class,
1047  $auth_ipe_context->value
1048  );
1049  $this->tabs_gui->addSubTabTarget(
1050  $auth_ipe_context->tabIdentifier(),
1051  $this->ctrl->getLinkTargetByClass(
1052  ilAuthPageEditorGUI::class,
1054  )
1055  );
1056  $this->ctrl->setParameterByClass(
1057  ilAuthPageEditorGUI::class,
1059  null
1060  );
1061  }
1062 
1063  $this->tabs_gui->addSubTabTarget(
1064  'logout_behaviour',
1065  $this->ctrl->getLinkTargetByClass(ilAuthLogoutBehaviourGUI::class, ''),
1066  ''
1067  );
1068 
1069  $this->tabs_gui->addSubTab(
1070  'style',
1071  $this->lng->txt('cont_style'),
1072  $this->ctrl->getLinkTargetByClass(ilObjectContentStyleSettingsGUI::class)
1073  );
1074  }
1075  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ testSoapAuthConnectionObject()

ilObjAuthSettingsGUI::testSoapAuthConnectionObject ( )

Definition at line 723 of file class.ilObjAuthSettingsGUI.php.

References buildSOAPForm(), buildSOAPTestForm(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilSOAPAuth\testConnection().

723  : void
724  {
725  if (!$this->rbac_system->checkAccess('read', $this->object->getRefId())) {
726  $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
727  }
728 
729  $soap_form = $this->buildSOAPForm($this->ctrl->getFormAction($this, 'saveSOAP'));
730  $test_form = $this->buildSOAPTestForm($this->ctrl->getFormAction($this, 'testSoapAuthConnection'));
731  $panel_content = [$soap_form, $test_form];
732  if ($this->request->getMethod() === 'POST') {
733  $test_form = $test_form->withRequest($this->request);
734  $result = $test_form->getData();
735  if (!is_null($result)) {
736  $panel_content[] = $this->ui_factory->legacy()->content(
737  ilSOAPAuth::testConnection($result['ext_uid'], $result['soap_pw'], $result['new_user'])
738  );
739  }
740  }
741  $this->tabs_gui->setTabActive('auth_soap');
742  $panel = $this->ui_factory->panel()->standard('SOAP', $panel_content);
743  $this->tpl->setContent($this->ui_renderer->render($panel));
744  }
buildSOAPTestForm(string $submit_action)
buildSOAPForm(string $submit_action)
Class ilObjForumAdministration.
static testConnection(string $a_ext_uid, string $a_soap_pw, bool $a_new_user)
+ Here is the call graph for this function:

◆ updateAuthModeDeterminationObject()

ilObjAuthSettingsGUI::updateAuthModeDeterminationObject ( )
private

Definition at line 429 of file class.ilObjAuthSettingsGUI.php.

References ilAuthModeDetermination\_getInstance(), authSettingsObject(), buildAuthModeDeterminationForm(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\int(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), null, and ilAuthModeDetermination\TYPE_AUTOMATIC.

429  : void
430  {
431  if (!$this->rbac_system->checkAccess('write', $this->object->getRefId())) {
432  $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
433  }
434 
435  $form = $this->buildAuthModeDeterminationForm();
436  if ($form === null) {
437  $this->authSettingsObject();
438  return;
439  }
440 
441  $form_valid = false;
442  $form_data = null;
443  if ($this->http->request()->getMethod() === 'POST') {
444  $form = $form->withRequest($this->http->request());
445  $form_data = $form->getData();
446  $form_valid = $form_data !== null;
447  }
448 
449  if (!$form_valid) {
450  $this->tpl->setOnScreenMessage(
451  $this->tpl::MESSAGE_TYPE_FAILURE,
452  $this->lng->txt('err_wrong_login')
453  );
454  $this->authSettingsObject($form);
455  return;
456  }
457 
459  $kind = (int) $form_data[self::PROP_AUTH_MODE_KIND];
460  $det->setKind($kind);
462  $sequence = $form_data[self::PROP_AUTH_MODE_SEQUENCE];
463  $this->logger->debug('pos mode:' . print_r($sequence, true));
464  asort($sequence, SORT_NUMERIC);
465  $this->logger->debug('pos mode:' . print_r($sequence, true));
466  $counter = 0;
467  $position = [];
468  foreach (array_keys($sequence) as $auth_mode) {
469  $position[$counter++] = substr($auth_mode, 1);
470  }
471  $this->logger->debug('position mode:' . print_r($position, true));
472  $det->setAuthModeSequence($position);
473  }
474  $det->save();
475 
476  $this->tpl->setOnScreenMessage(
477  $this->tpl::MESSAGE_TYPE_SUCCESS,
478  $this->lng->txt('settings_saved'),
479  true
480  );
481  $this->ctrl->redirect($this, 'authSettings');
482  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static http()
Fetches the global http state from ILIAS.
authSettingsObject(?ILIAS\UI\Component\Input\Container\Form\Form $auth_mode_determination_form=null, ?ILIAS\UI\Component\Input\Container\Form\Form $registration_role_mapping_form=null)
Class ilObjForumAdministration.
+ Here is the call graph for this function:

◆ updateRegistrationRoleMappingObject()

ilObjAuthSettingsGUI::updateRegistrationRoleMappingObject ( )
private

Definition at line 281 of file class.ilObjAuthSettingsGUI.php.

References ilObjRole\_updateAuthMode(), authSettingsObject(), buildRegistrationRoleMappingForm(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and null.

281  : void
282  {
283  if (!$this->rbac_system->checkAccess('write', $this->object->getRefId())) {
284  $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
285  }
286 
287  $form = $this->buildRegistrationRoleMappingForm();
288  $form_valid = false;
289  $form_data = null;
290  if ($this->http->request()->getMethod() === 'POST') {
291  $form = $form->withRequest($this->http->request());
292  $form_data = $form->getData();
293  $form_valid = $form_data !== null;
294  }
295 
296  if (!$form_valid) {
297  $this->tpl->setOnScreenMessage(
298  $this->tpl::MESSAGE_TYPE_FAILURE,
299  $this->lng->txt('err_wrong_login')
300  );
301  $this->authSettingsObject(null, $form);
302  return;
303  }
304 
305  $f_object = [];
306  foreach ($form_data as $role_id => $auth_mode) {
307  $f_object[substr($role_id, 2)] = $auth_mode;
308  }
309  ilObjRole::_updateAuthMode($f_object);
310 
311  $this->tpl->setOnScreenMessage(
312  $this->tpl::MESSAGE_TYPE_SUCCESS,
313  $this->lng->txt('auth_mode_roles_changed'),
314  true
315  );
316  $this->ctrl->redirect($this, 'authSettings');
317  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static http()
Fetches the global http state from ILIAS.
authSettingsObject(?ILIAS\UI\Component\Input\Container\Form\Form $auth_mode_determination_form=null, ?ILIAS\UI\Component\Input\Container\Form\Form $registration_role_mapping_form=null)
Class ilObjForumAdministration.
static _updateAuthMode(array $a_roles)
+ Here is the call graph for this function:

◆ validateApacheAuthAllowedDomains()

ilObjAuthSettingsGUI::validateApacheAuthAllowedDomains ( string  $text)
private

Definition at line 1274 of file class.ilObjAuthSettingsGUI.php.

Referenced by saveApacheSettingsObject().

1274  : string
1275  {
1276  return implode("\n", preg_split("/[\r\n]+/", $text));
1277  }
+ Here is the caller graph for this function:

◆ viewObject()

ilObjAuthSettingsGUI::viewObject ( )

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

References authSettingsObject().

56  : void
57  {
58  $this->authSettingsObject();
59  }
authSettingsObject(?ILIAS\UI\Component\Input\Container\Form\Form $auth_mode_determination_form=null, ?ILIAS\UI\Component\Input\Container\Form\Form $registration_role_mapping_form=null)
+ Here is the call graph for this function:

Field Documentation

◆ $content_style_gui

GUIService ilObjAuthSettingsGUI::$content_style_gui
private

Definition at line 38 of file class.ilObjAuthSettingsGUI.php.

◆ $http

ILIAS HTTP GlobalHttpState ilObjAuthSettingsGUI::$http
private

Definition at line 36 of file class.ilObjAuthSettingsGUI.php.

◆ $logger

ilLogger ilObjAuthSettingsGUI::$logger
private

Definition at line 35 of file class.ilObjAuthSettingsGUI.php.

◆ PROP_AUTH_MODE_KIND

const ilObjAuthSettingsGUI::PROP_AUTH_MODE_KIND = 'kind'
private

Definition at line 32 of file class.ilObjAuthSettingsGUI.php.

◆ PROP_AUTH_MODE_SEQUENCE

const ilObjAuthSettingsGUI::PROP_AUTH_MODE_SEQUENCE = 'sequence'
private

Definition at line 33 of file class.ilObjAuthSettingsGUI.php.


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