ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilObjAuthSettingsGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
17 require_once "./classes/class.ilObjectGUI.php";
18 
20 {
25  function ilObjAuthSettingsGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output = true)
26  {
27  $this->type = "auth";
28  $this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
29 
30  $this->lng->loadLanguageModule('registration');
31 
32  define('LDAP_DEFAULT_PORT',389);
33  define('RADIUS_DEFAULT_PORT',1812);
34  }
35 
36  function viewObject()
37  {
38  // load ilRegistrationSettingsGUI
39 
40  include_once './Services/Registration/classes/class.ilRegistrationSettingsGUI.php';
41 
42  // Enable tabs
43  $this->tabs_gui->setTabActive('registration_settings');
44 
45  $registration_gui =& new ilRegistrationSettingsGUI();
46  $this->ctrl->setCmdClass('ilregistrationsettingsgui');
47  $this->ctrl->forwardCommand($registration_gui);
48  }
49 
50 
56  function authSettingsObject()
57  {
58  global $rbacsystem, $ilSetting;
59 
60  if (!$rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
61  {
62  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
63  }
64 
65  $this->tabs_gui->setTabActive('authentication_settings');
66  $this->setSubTabs('authSettings');
67  $this->tabs_gui->setSubTabActive("auth_settings");
68 
69  $this->getTemplateFile("general");
70 
71  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
72  $this->tpl->setVariable("TXT_AUTH_TITLE", $this->lng->txt("auth_select"));
73 
74  $this->tpl->setVariable("TXT_AUTH_MODE", $this->lng->txt("auth_mode"));
75  $this->tpl->setVariable("TXT_AUTH_DEFAULT", $this->lng->txt("default"));
76  $this->tpl->setVariable("TXT_AUTH_ACTIVE", $this->lng->txt("active"));
77  $this->tpl->setVariable("TXT_AUTH_NUM_USERS", $this->lng->txt("num_users"));
78 
79  $this->tpl->setVariable("TXT_LOCAL", $this->lng->txt("auth_local"));
80  $this->tpl->setVariable("TXT_LDAP", $this->lng->txt("auth_ldap"));
81  $this->tpl->setVariable("TXT_SHIB", $this->lng->txt("auth_shib"));
82 
83  $this->tpl->setVariable("TXT_CAS", $this->lng->txt("auth_cas"));
84 
85  $this->tpl->setVariable("TXT_RADIUS", $this->lng->txt("auth_radius"));
86  $this->tpl->setVariable("TXT_SCRIPT", $this->lng->txt("auth_script"));
87 
89  $auth_modes = ilAuthUtils::_getAllAuthModes();
90 
91  foreach($auth_modes as $mode => $mode_name)
92  {
93 //echo "-".$ilSetting->get('auth_mode')."-".$mode."-";
94  if ($ilSetting->get('auth_mode') == $mode)
95  {
96  $this->tpl->setVariable("NUM_".strtoupper($mode_name),
97  ((int) $auth_cnt[$mode_name] + $auth_cnt["default"])." (".$this->lng->txt("auth_per_default").
98  ": ".$auth_cnt["default"].")");
99  }
100  else
101  {
102  $this->tpl->setVariable("NUM_".strtoupper($mode_name),
103  (int) $auth_cnt[$mode_name]);
104  }
105  }
106 
107  $this->tpl->setVariable("TXT_CONFIGURE", $this->lng->txt("auth_configure"));
108  $this->tpl->setVariable("TXT_AUTH_REMARK", $this->lng->txt("auth_remark_non_local_auth"));
109  $this->tpl->setVariable("TXT_SUBMIT", $this->lng->txt("save"));
110  $this->tpl->setVariable("CMD_SUBMIT", "setAuthMode");
111 
112  // local vars
113  $checked = "checked=\"checked\"";
114  $disabled = "disabled=\"disabled\"";
115  $style_disabled = "_disabled";
116 
117  // icon handlers
118  $icon_ok = "<img src=\"".ilUtil::getImagePath("icon_ok.gif")."\" alt=\"".$this->lng->txt("enabled")."\" title=\"".$this->lng->txt("enabled")."\" border=\"0\" vspace=\"0\"/>";
119  $icon_not_ok = "<img src=\"".ilUtil::getImagePath("icon_not_ok.gif")."\" alt=\"".$this->lng->txt("disabled")."\" title=\"".$this->lng->txt("disabled")."\" border=\"0\" vspace=\"0\"/>";
120 
121  $this->tpl->setVariable("AUTH_LOCAL_ACTIVE", $icon_ok);
122 
123  include_once('Services/LDAP/classes/class.ilLDAPServer.php');
124  $this->tpl->setVariable('AUTH_LDAP_ACTIVE',count(ilLDAPServer::_getActiveServerList()) ? $icon_ok : $icon_not_ok);
125  #$this->tpl->setVariable("AUTH_LDAP_ACTIVE", $this->ilias->getSetting('ldap_active') ? $icon_ok : $icon_not_ok);
126  $this->tpl->setVariable("AUTH_RADIUS_ACTIVE", $this->ilias->getSetting('radius_active') ? $icon_ok : $icon_not_ok);
127  $this->tpl->setVariable("AUTH_SHIB_ACTIVE", $this->ilias->getSetting('shib_active') ? $icon_ok : $icon_not_ok);
128  $this->tpl->setVariable("AUTH_SCRIPT_ACTIVE", $this->ilias->getSetting('script_active') ? $icon_ok : $icon_not_ok);
129  $this->tpl->setVariable("AUTH_CAS_ACTIVE", $this->ilias->getSetting('cas_active') ? $icon_ok : $icon_not_ok);
130 
131  // alter style and disable buttons depending on current selection
132  switch ($this->ilias->getSetting('auth_mode'))
133  {
134  case AUTH_LOCAL: // default
135  $this->tpl->setVariable("CHK_LOCAL", $checked);
136  break;
137 
138  case AUTH_LDAP: // LDAP
139  $this->tpl->setVariable("CHK_LDAP", $checked);
140  break;
141 
142  case AUTH_SHIBBOLETH: // SHIB
143  $this->tpl->setVariable("CHK_SHIB", $checked);
144  break;
145 
146  case AUTH_RADIUS: // RADIUS
147  $this->tpl->setVariable("CHK_RADIUS", $checked);
148  break;
149 
150  case AUTH_CAS: // CAS
151  $this->tpl->setVariable("CHK_CAS", $checked);
152  break;
153 
154  case AUTH_SCRIPT: // script
155  $this->tpl->setVariable("CHK_SCRIPT", $checked);
156  break;
157  }
158 
159  // auth mode determinitation
160  if($this->initAuthModeDetermination())
161  {
162  $this->tpl->setVariable('TABLE_AUTH_DETERMINATION',$this->form->getHTML());
163  }
164 
165  // roles table
166  $this->tpl->setVariable("FORMACTION_ROLES",
167  $this->ctrl->getFormAction($this));
168  $this->tpl->setVariable("TXT_AUTH_ROLES", $this->lng->txt("auth_active_roles"));
169  $this->tpl->setVariable("TXT_ROLE", $this->lng->txt("obj_role"));
170  $this->tpl->setVariable("TXT_ROLE_AUTH_MODE", $this->lng->txt("auth_role_auth_mode"));
171  $this->tpl->setVariable("CMD_SUBMIT_ROLES", "updateAuthRoles");
172 
173  include_once("./Services/AccessControl/classes/class.ilObjRole.php");
174  $reg_roles = ilObjRole::_lookupRegisterAllowed();
175 
176  // auth mode selection
177  include_once('./Services/Authentication/classes/class.ilAuthUtils.php');
178  $active_auth_modes = ilAuthUtils::_getActiveAuthModes();
179 
180  foreach ($reg_roles as $role)
181  {
182  foreach ($active_auth_modes as $auth_name => $auth_key)
183  {
184  // do not list auth modes with external login screen
185  // even not default, because it can easily be set to
186  // a non-working auth mode
187  if ($auth_name == "default" || $auth_name == "cas"
188  || $auth_name == "shibboleth" || $auth_name == 'ldap')
189  {
190  continue;
191  }
192 
193  $this->tpl->setCurrentBlock("auth_mode_selection");
194 
195  if ($auth_name == 'default')
196  {
197  $name = $this->lng->txt('auth_'.$auth_name)." (".$this->lng->txt('auth_'.ilAuthUtils::_getAuthModeName($auth_key)).")";
198  }
199  else
200  {
201  $name = $this->lng->txt('auth_'.$auth_name);
202  }
203 
204  $this->tpl->setVariable("AUTH_MODE_NAME", $name);
205 
206  $this->tpl->setVariable("AUTH_MODE", $auth_name);
207 
208  if ($role['auth_mode'] == $auth_name)
209  {
210  $this->tpl->setVariable("SELECTED_AUTH_MODE", "selected=\"selected\"");
211  }
212 
213  $this->tpl->parseCurrentBlock();
214  } // END auth_mode selection
215 
216  $this->tpl->setCurrentBlock("roles");
217  $this->tpl->setVariable("ROLE", $role['title']);
218  $this->tpl->setVariable("ROLE_ID", $role['id']);
219  $this->tpl->parseCurrentBlock();
220  }
221  }
222 
230  public function saveLoginInfoObject()
231  {
232  global $rbacsystem, $lng,$ilSetting;
233 
234  if (!$rbacsystem->checkAccess("write",$this->object->getRefId()))
235  {
236  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
237  }
238 
239  $this->initLoginForm();
240  if ($this->form->checkInput())
241  {
242  if (is_array($_POST))
243  {
244  $this->loginSettings = new ilSetting("login_settings");
245 
246  foreach ($_POST as $key => $val)
247  {
248  if (substr($key, 0, 14) == "login_message_")
249  {
250  $this->loginSettings->set($key, $val);
251  }
252  }
253  }
254 
255  if($_POST['default_auth_mode'])
256  {
257  $ilSetting->set('default_auth_mode',(int) $_POST['default_auth_mode']);
258  }
259 
260  ilUtil::sendSuccess($this->lng->txt("login_information_settings_saved"));
261  }
262 
263  $this->loginInfoObject();
264  }
265 
272  public function loginInfoObject()
273  {
274  global $rbacsystem, $lng,$ilSetting;
275 
276  if (!$rbacsystem->checkAccess("visible,read", $this->object->getRefId()))
277  {
278  $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
279  }
280 
281  $this->tabs_gui->setTabActive("authentication_settings");
282  $this->setSubTabs("authSettings");
283  $this->tabs_gui->setSubTabActive("login_information");
284 
285  $lng->loadLanguageModule("meta");
286 
287  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.auth_login_messages.html");
288  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
289  $this->tpl->setVariable("TXT_HEADLINE", $this->lng->txt("login_information"));
290  $this->tpl->setVariable("TXT_DESCRIPTION", $this->lng->txt("login_information_desc"));
291  $this->tpl->setVariable("TXT_SUBMIT", $this->lng->txt("save"));
292  $this->initLoginForm();
293  $this->tpl->setVariable('LOGIN_INFO',$this->form->getHTML());
294  }
295 
299  function initLoginForm()
300  {
301  global $rbacsystem, $lng,$ilSetting;
302 
303  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
304  $this->form = new ilPropertyFormGUI();
305  $this->form->setFormAction($this->ctrl->getFormAction($this,'saveLoginInfo'));
306  $this->form->setTableWidth('80%');
307  $this->form->setTitle($this->lng->txt('login_information'));
308  #$form->setInfo($this->lng->txt('login_information_desc'));
309 
310  $this->form->addCommandButton('saveLoginInfo',$this->lng->txt('save'));
311  $this->form->addCommandButton('cancel',$this->lng->txt('cancel'));
312 
313  include_once('Services/LDAP/classes/class.ilLDAPServer.php');
314  include_once('Services/Radius/classes/class.ilRadiusSettings.php');
315  $rad_settings = ilRadiusSettings::_getInstance();
316  if($ldap_id = ilLDAPServer::_getFirstActiveServer() or $rad_settings->isActive())
317  {
318  $select = new ilSelectInputGUI($this->lng->txt('default_auth_mode'),'default_auth_mode');
319  $select->setValue($ilSetting->get('default_auth_mode',AUTH_LOCAL));
320  $select->setInfo($this->lng->txt('default_auth_mode_info'));
321  $options[AUTH_LOCAL] = $this->lng->txt('auth_local');
322  if($ldap_id)
323  {
324  $options[AUTH_LDAP] = $this->lng->txt('auth_ldap');
325  }
326  if($rad_settings->isActive())
327  {
328  $options [AUTH_RADIUS] = $this->lng->txt('auth_radius');
329  }
330  $select->setOptions($options);
331  $this->form->addItem($select);
332  }
333 
334  if (!is_object($this->loginSettings))
335  {
336  $this->loginSettings = new ilSetting("login_settings");
337  }
338 
339  $login_settings = $this->loginSettings->getAll();
340  $languages = $lng->getInstalledLanguages();
341  $def_language = $lng->getDefaultLanguage();
342 
343  foreach ($this->setDefLangFirst($def_language, $languages) as $lang_key)
344  {
345  $add = "";
346  if ($lang_key == $def_language)
347  {
348  $add = " (".$lng->txt("default").")";
349  }
350 
351  $textarea = new ilTextAreaInputGUI($lng->txt("meta_l_".$lang_key).$add,
352  'login_message_'.$lang_key);
353  $textarea->setRows(10);
354  $textarea->setValue($login_settings["login_message_".$lang_key]);
355  $textarea->setUseRte(true);
356  $this->form->addItem($textarea);
357 
358  unset($login_settings["login_message_".$lang_key]);
359  }
360 
361  foreach ($login_settings as $key => $message)
362  {
363  $lang_key = substr($key, strrpos($key, "_") + 1, strlen($key) - strrpos($key, "_"));
364 
365  $textarea = new ilTextAreaInputGUI($lng->txt("meta_l_".$lang_key).$add,
366  'login_message_'.$lang_key);
367  $textarea->setRows(10);
368  $textarea->setValue($message);
369  $textarea->setUseRte(true);
370 
371  if(!in_array($lang_key,$languages))
372  {
373  $textarea->setAlert($lng->txt("not_installed"));
374  }
375  $this->form->addItem($textarea);
376  }
377  }
378 
390  public function setDefLangFirst($a_def_language, $a_languages)
391  {
392  if (is_array($a_languages) && $a_def_language != "")
393  {
394  $languages = array();
395  $languages[] = $a_def_language;
396 
397  foreach ($a_languages as $val)
398  {
399  if (!in_array($val, $languages))
400  {
401  $languages[] = $val;
402  }
403  }
404 
405  return $languages;
406  }
407  else
408  {
409  return array();
410  }
411  }
412 
413  function cancelObject()
414  {
415  $this->ctrl->redirect($this, "authSettings");
416  }
417 
418  function setAuthModeObject()
419  {
420  global $rbacsystem,$ilSetting;
421 
422  if (!$rbacsystem->checkAccess("write",$this->object->getRefId()))
423  {
424  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
425  }
426 
427  if (empty($_POST["auth_mode"]))
428  {
429  $this->ilias->raiseError($this->lng->txt("auth_err_no_mode_selected"),$this->ilias->error_obj->MESSAGE);
430  }
431 
432  if ($_POST["auth_mode"] == AUTH_DEFAULT)
433  {
434  ilUtil::sendInfo($this->lng->txt("auth_mode").": ".$this->getAuthModeTitle()." ".$this->lng->txt("auth_mode_not_changed"),true);
435  $this->ctrl->redirect($this,'authSettings');
436  }
437 
438  switch ($_POST["auth_mode"])
439  {
440  case AUTH_LDAP:
441 
442  /*
443  if ($this->object->checkAuthLDAP() !== true)
444  {
445  ilUtil::sendInfo($this->lng->txt("auth_ldap_not_configured"),true);
446  ilUtil::redirect($this->getReturnLocation("authSettings",$this->ctrl->getLinkTarget($this,"editLDAP")));
447  }
448  */
449  break;
450 
451  case AUTH_SHIB:
452  if ($this->object->checkAuthSHIB() !== true)
453  {
454  ilUtil::sendFailure($this->lng->txt("auth_shib_not_configured"),true);
455  ilUtil::redirect($this->getReturnLocation("authSettings",$this->ctrl->getLinkTarget($this,"editSHIB")));
456  }
457  break;
458 
459  case AUTH_RADIUS:
460  if ($this->object->checkAuthRADIUS() !== true)
461  {
462  ilUtil::sendFailure($this->lng->txt("auth_radius_not_configured"),true);
463  $this->ctrl->redirect($this,'editRADIUS');
464  }
465  break;
466 
467  case AUTH_SCRIPT:
468  if ($this->object->checkAuthScript() !== true)
469  {
470  ilUtil::sendFailure($this->lng->txt("auth_script_not_configured"),true);
471  ilUtil::redirect($this->getReturnLocation("authSettings",$this->ctrl->getLinkTarget($this,"editScript")));
472  }
473  break;
474  }
475 
476  $this->ilias->setSetting("auth_mode",$_POST["auth_mode"]);
477 
478  ilUtil::sendSuccess($this->lng->txt("auth_default_mode_changed_to")." ".$this->getAuthModeTitle(),true);
479  $this->ctrl->redirect($this,'authSettings');
480  }
481 
482 
483 
484 
485 
491  function editCASObject()
492  {
493  global $rbacsystem, $rbacreview, $ilSetting;
494 
495  if (!$rbacsystem->checkAccess("read",$this->object->getRefId()))
496  {
497  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
498  }
499 
500  $this->tabs_gui->setTabActive('auth_cas');
501 
502  // get template
503  $this->getTemplateFile("cas");
504 
505  // get all settings
506  $settings = $ilSetting->getAll();
507 
508  // get values in error case
509  if ($_SESSION["error_post_vars"])
510  {
511  if ($_SESSION["error_post_vars"]["cas"]["active"] == "1")
512  {
513  $this->tpl->setVariable("CHK_CAS_ACTIVE", "checked=\"checked\"");
514  }
515  if ($_SESSION["error_post_vars"]["cas"]["create_users"] == "1")
516  {
517  $this->tpl->setVariable("CHK_CREATE_USERS", "checked=\"checked\"");
518  }
519  if ($_SESSION["error_post_vars"]["cas"]["allow_local"] == "1")
520  {
521  $this->tpl->setVariable("CHK_ALLOW_LOCAL", "checked=\"checked\"");
522  }
523 
524  $this->tpl->setVariable("CAS_SERVER", $_SESSION["error_post_vars"]["cas"]["server"]);
525  $this->tpl->setVariable("CAS_PORT", $_SESSION["error_post_vars"]["cas"]["port"]);
526  $this->tpl->setVariable("CAS_URI", $_SESSION["error_post_vars"]["cas"]["uri"]);
527  $this->tpl->setVariable("CAS_LOGIN_INSTRUCTIONS", $_SESSION["error_post_vars"]["cas"]["login_instructions"]);
528  $current_default_role = $_SESSION["error_post_vars"]["cas"]["user_default_role"];
529  }
530  else
531  {
532  if ($settings["cas_active"] == "1")
533  {
534  $this->tpl->setVariable("CHK_CAS_ACTIVE", "checked=\"checked\"");
535  }
536  if ($settings["cas_create_users"] == "1")
537  {
538  $this->tpl->setVariable("CHK_CREATE_USERS", "checked=\"checked\"");
539  }
540  if ($settings["cas_allow_local"] == "1")
541  {
542  $this->tpl->setVariable("CHK_ALLOW_LOCAL", "checked=\"checked\"");
543  }
544 
545  $this->tpl->setVariable("CAS_SERVER", $settings["cas_server"]);
546  $this->tpl->setVariable("CAS_PORT", $settings["cas_port"]);
547  $this->tpl->setVariable("CAS_URI", $settings["cas_uri"]);
548  $this->tpl->setVariable("CAS_LOGIN_INSTRUCTIONS", $settings["cas_login_instructions"]);
549  $current_default_role = $settings["cas_user_default_role"];
550  }
551 
552  // compose role list
553  $role_list = $rbacreview->getRolesByFilter(2,$this->object->getId());
554  if (!$current_default_role)
555  {
556  $current_default_role = 4;
557  }
558  $roles = array();
559  foreach ($role_list as $role)
560  {
561  $roles[$role['obj_id']] = $role['title'];
562  }
563  $selectElement = ilUtil::formSelect($current_default_role,
564  "cas[user_default_role]", $roles, false, true);
565 
566  $this->tpl->setVariable("CAS_USER_DEFAULT_ROLE", $selectElement);
567  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
568  $this->tpl->setVariable("COLSPAN", 3);
569  $this->tpl->setVariable("TXT_CAS_TITLE", $this->lng->txt("auth_cas_auth"));
570  $this->tpl->setVariable("TXT_CAS_DESC", $this->lng->txt("auth_cas_auth_desc"));
571  $this->tpl->setVariable("TXT_OPTIONS", $this->lng->txt("options"));
572  $this->tpl->setVariable("TXT_CAS_ACTIVE", $this->lng->txt("active"));
573  $this->tpl->setVariable("TXT_CAS_SERVER", $this->lng->txt("server"));
574  $this->tpl->setVariable("TXT_CAS_SERVER_DESC", $this->lng->txt("auth_cas_server_desc"));
575  $this->tpl->setVariable("TXT_CAS_PORT", $this->lng->txt("port"));
576  $this->tpl->setVariable("TXT_CAS_PORT_DESC", $this->lng->txt("auth_cas_port_desc"));
577  $this->tpl->setVariable("TXT_CAS_URI", $this->lng->txt("uri"));
578  $this->tpl->setVariable("TXT_CAS_URI_DESC", $this->lng->txt("auth_cas_uri_desc"));
579  $this->tpl->setVariable("TXT_CAS_LOGIN_INSTRUCTIONS", $this->lng->txt("auth_login_instructions"));
580  $this->tpl->setVariable("TXT_CREATE_USERS", $this->lng->txt("auth_create_users"));
581  $this->tpl->setVariable("TXT_CREATE_USERS_DESC", $this->lng->txt("auth_cas_create_users_desc"));
582  $this->tpl->setVariable("TXT_CAS_USER_DEFAULT_ROLE", $this->lng->txt("auth_user_default_role"));
583  $this->tpl->setVariable("TXT_CAS_USER_DEFAULT_ROLE_DESC",
584  $this->lng->txt("auth_cas_user_default_role_desc"));
585  $this->tpl->setVariable("TXT_ALLOW_LOCAL", $this->lng->txt("auth_allow_local"));
586  $this->tpl->setVariable("TXT_ALLOW_LOCAL_DESC", $this->lng->txt("auth_cas_allow_local_desc"));
587  $this->tpl->setVariable("TXT_REQUIRED_FLD", $this->lng->txt("required_field"));
588  $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
589  $this->tpl->setVariable("TXT_SUBMIT", $this->lng->txt("save"));
590  $this->tpl->setVariable("CMD_SUBMIT", "saveCAS");
591  }
592 
598  function saveCASObject()
599  {
600  global $ilUser, $ilSetting, $rbacsystem;
601 
602  if (!$rbacsystem->checkAccess("write",$this->object->getRefId()))
603  {
604  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
605  }
606 
607  // validate required data
608  if (!$_POST["cas"]["server"] or !$_POST["cas"]["port"])
609  {
610  $this->ilias->raiseError($this->lng->txt("fill_out_all_required_fields"),$this->ilias->error_obj->MESSAGE);
611  }
612 
613  // validate port
614  if ((preg_match("/^[0-9]{0,5}$/",$_POST["cas"]["port"])) == false)
615  {
616  $this->ilias->raiseError($this->lng->txt("err_invalid_port"),$this->ilias->error_obj->MESSAGE);
617  }
618 
619  $ilSetting->set("cas_server", $_POST["cas"]["server"]);
620  $ilSetting->set("cas_port", $_POST["cas"]["port"]);
621  $ilSetting->set("cas_uri", $_POST["cas"]["uri"]);
622  $ilSetting->set("cas_login_instructions", $_POST["cas"]["login_instructions"]);
623  $ilSetting->set("cas_active", $_POST["cas"]["active"]);
624  $ilSetting->set("cas_create_users", $_POST["cas"]["create_users"]);
625  $ilSetting->set("cas_allow_local", $_POST["cas"]["allow_local"]);
626  $ilSetting->set("cas_active", $_POST["cas"]["active"]);
627  $ilSetting->set("cas_user_default_role", $_POST["cas"]["user_default_role"]);
628  ilUtil::sendSuccess($this->lng->txt("auth_cas_settings_saved"),true);
629 
630  $this->ctrl->redirect($this,'editCAS');
631  }
632 
638  function editSOAPObject()
639  {
640  global $rbacsystem, $rbacreview, $ilSetting, $ilCtrl, $lng;
641 
642  if (!$rbacsystem->checkAccess("read",$this->object->getRefId()))
643  {
644  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
645  }
646 
647  $this->tabs_gui->setTabActive('auth_soap');
648 
649  // get template
650  $stpl = new ilTemplate("tpl.auth_soap.html", true, true, "");
651 
652  //$this->getTemplateFile("soap");
653 
654  // get all settings
655  $settings = $ilSetting->getAll();
656 
657  // get values in error case
658  if ($_SESSION["error_post_vars"])
659  {
660  if ($_SESSION["error_post_vars"]["soap"]["active"] == "1")
661  {
662  $stpl->setVariable("CHK_SOAP_ACTIVE", "checked=\"checked\"");
663  }
664  if ($_SESSION["error_post_vars"]["soap"]["use_https"] == "1")
665  {
666  $stpl->setVariable("CHK_USE_HTTPS", "checked=\"checked\"");
667  }
668  if ($_SESSION["error_post_vars"]["soap"]["create_users"] == "1")
669  {
670  $stpl->setVariable("CHK_CREATE_USERS", "checked=\"checked\"");
671  }
672  if ($_SESSION["error_post_vars"]["soap"]["allow_local"] == "1")
673  {
674  $stpl->setVariable("CHK_ALLOW_LOCAL", "checked=\"checked\"");
675  }
676  if ($_SESSION["error_post_vars"]["soap"]["account_mail"] == "1")
677  {
678  $stpl->setVariable("CHK_ACCOUNT_MAIL", "checked=\"checked\"");
679  }
680  if ($_SESSION["error_post_vars"]["soap"]["use_dotnet"] == "1")
681  {
682  $stpl->setVariable("CHK_USEDOTNET", "checked=\"checked\"");
683  }
684 
685  $stpl->setVariable("SOAP_SERVER", $_SESSION["error_post_vars"]["soap"]["server"]);
686  $stpl->setVariable("SOAP_PORT", $_SESSION["error_post_vars"]["soap"]["port"]);
687  $stpl->setVariable("SOAP_URI", $_SESSION["error_post_vars"]["soap"]["uri"]);
688  $stpl->setVariable("SOAP_NAMESPACE", $_SESSION["error_post_vars"]["soap"]["namespace"]);
689  $current_default_role = $_SESSION["error_post_vars"]["soap"]["user_default_role"];
690  }
691  else
692  {
693  if ($settings["soap_auth_active"] == "1")
694  {
695  $stpl->setVariable("CHK_SOAP_ACTIVE", "checked=\"checked\"");
696  }
697  if ($settings["soap_auth_use_https"] == "1")
698  {
699  $stpl->setVariable("CHK_USE_HTTPS", "checked=\"checked\"");
700  }
701  if ($settings["soap_auth_create_users"] == "1")
702  {
703  $stpl->setVariable("CHK_CREATE_USERS", "checked=\"checked\"");
704  }
705  if ($settings["soap_auth_allow_local"] == "1")
706  {
707  $stpl->setVariable("CHK_ALLOW_LOCAL", "checked=\"checked\"");
708  }
709  if ($settings["soap_auth_account_mail"] == "1")
710  {
711  $stpl->setVariable("CHK_ACCOUNT_MAIL", "checked=\"checked\"");
712  }
713  if ($settings["soap_auth_use_dotnet"] == "1")
714  {
715  $stpl->setVariable("CHK_USE_DOTNET", "checked=\"checked\"");
716  }
717 
718  $stpl->setVariable("SOAP_SERVER", $settings["soap_auth_server"]);
719  $stpl->setVariable("SOAP_PORT", $settings["soap_auth_port"]);
720  $stpl->setVariable("SOAP_URI", $settings["soap_auth_uri"]);
721  $stpl->setVariable("SOAP_NAMESPACE", $settings["soap_auth_namespace"]);
722  $current_default_role = $settings["soap_auth_user_default_role"];
723  }
724 
725  // compose role list
726  $role_list = $rbacreview->getRolesByFilter(2,$this->object->getId());
727  if (!$current_default_role)
728  {
729  $current_default_role = 4;
730  }
731  $roles = array();
732  foreach ($role_list as $role)
733  {
734  $roles[$role['obj_id']] = $role['title'];
735  }
736  $selectElement = ilUtil::formSelect($current_default_role,
737  "soap[user_default_role]", $roles, false, true);
738 
739  $stpl->setVariable("SOAP_USER_DEFAULT_ROLE", $selectElement);
740  $stpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
741  $stpl->setVariable("COLSPAN", 3);
742  $stpl->setVariable("TXT_SOAP_TITLE", $this->lng->txt("auth_soap_auth"));
743  $stpl->setVariable("TXT_SOAP_DESC", $this->lng->txt("auth_soap_auth_desc"));
744  $stpl->setVariable("TXT_OPTIONS", $this->lng->txt("options"));
745  $stpl->setVariable("TXT_SOAP_ACTIVE", $this->lng->txt("active"));
746  $stpl->setVariable("TXT_SOAP_SERVER", $this->lng->txt("server"));
747  $stpl->setVariable("TXT_SOAP_SERVER_DESC", $this->lng->txt("auth_soap_server_desc"));
748  $stpl->setVariable("TXT_SOAP_PORT", $this->lng->txt("port"));
749  $stpl->setVariable("TXT_SOAP_PORT_DESC", $this->lng->txt("auth_soap_port_desc"));
750  $stpl->setVariable("TXT_SOAP_URI", $this->lng->txt("uri"));
751  $stpl->setVariable("TXT_SOAP_URI_DESC", $this->lng->txt("auth_soap_uri_desc"));
752  $stpl->setVariable("TXT_SOAP_NAMESPACE", $this->lng->txt("auth_soap_namespace"));
753  $stpl->setVariable("TXT_SOAP_NAMESPACE_DESC", $this->lng->txt("auth_soap_namespace_desc"));
754  $stpl->setVariable("TXT_USE_DOTNET", $this->lng->txt("auth_soap_use_dotnet"));
755  $stpl->setVariable("TXT_USE_HTTPS", $this->lng->txt("auth_soap_use_https"));
756  $stpl->setVariable("TXT_CREATE_USERS", $this->lng->txt("auth_create_users"));
757  $stpl->setVariable("TXT_CREATE_USERS_DESC", $this->lng->txt("auth_soap_create_users_desc"));
758  $stpl->setVariable("TXT_ACCOUNT_MAIL", $this->lng->txt("user_send_new_account_mail"));
759  $stpl->setVariable("TXT_ACCOUNT_MAIL_DESC", $this->lng->txt("auth_new_account_mail_desc"));
760  $stpl->setVariable("TXT_SOAP_USER_DEFAULT_ROLE", $this->lng->txt("auth_user_default_role"));
761  $stpl->setVariable("TXT_SOAP_USER_DEFAULT_ROLE_DESC",
762  $this->lng->txt("auth_soap_user_default_role_desc"));
763  $stpl->setVariable("TXT_ALLOW_LOCAL", $this->lng->txt("auth_allow_local"));
764  $stpl->setVariable("TXT_ALLOW_LOCAL_DESC", $this->lng->txt("auth_soap_allow_local_desc"));
765  $stpl->setVariable("TXT_REQUIRED_FLD", $this->lng->txt("required_field"));
766  $stpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
767  $stpl->setVariable("TXT_SUBMIT", $this->lng->txt("save"));
768  $stpl->setVariable("CMD_SUBMIT", "saveSOAP");
769 
770  // test form
771  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
772  $form = new ilPropertyFormGUI();
773  $form->setFormAction($ilCtrl->getFormAction($this));
774  $form->setTitle("Test Request");
775  $text_prop = new ilTextInputGUI("ext_uid", "ext_uid");
776  $form->addItem($text_prop);
777  $text_prop2 = new ilTextInputGUI("soap_pw", "soap_pw");
778  $form->addItem($text_prop2);
779  $cb = new ilCheckboxInputGUI("new_user", "new_user");
780  $form->addItem($cb);
781 
782  $form->addCommandButton("testSoapAuthConnection",
783  "Send");
784 
785  if ($ilCtrl->getCmd() == "testSoapAuthConnection")
786  {
787  include_once("./Services/SOAPAuth/classes/class.ilSOAPAuth.php");
788  $ret = "<br />".ilSOAPAuth::testConnection(
789  ilUtil::stripSlashes($_POST["ext_uid"]),
790  ilUtil::stripSlashes($_POST["soap_pw"]),
791  (boolean) $_POST["new_user"]
792  );
793  }
794 
795  $stpl->setVariable("TEST_FORM", $form->getHtml().$ret);
796  $this->tpl->setContent($stpl->get());
797  }
798 
800  {
801  $this->editSOAPObject();
802  }
803 
809  function saveSOAPObject()
810  {
811  global $ilUser, $ilSetting, $rbacsystem;
812 
813  if (!$rbacsystem->checkAccess("write",$this->object->getRefId()))
814  {
815  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
816  }
817 
818  // validate required data
819  if (!$_POST["soap"]["server"])
820  {
821  $this->ilias->raiseError($this->lng->txt("fill_out_all_required_fields"),$this->ilias->error_obj->MESSAGE);
822  }
823 
824  // validate port
825  if ($_POST["soap"]["server"] != "" && (preg_match("/^[0-9]{0,5}$/",$_POST["soap"]["port"])) == false)
826  {
827  $this->ilias->raiseError($this->lng->txt("err_invalid_port"),$this->ilias->error_obj->MESSAGE);
828  }
829 
830  $ilSetting->set("soap_auth_server", $_POST["soap"]["server"]);
831  $ilSetting->set("soap_auth_port", $_POST["soap"]["port"]);
832  $ilSetting->set("soap_auth_active", $_POST["soap"]["active"]);
833  $ilSetting->set("soap_auth_uri", $_POST["soap"]["uri"]);
834  $ilSetting->set("soap_auth_namespace", $_POST["soap"]["namespace"]);
835  $ilSetting->set("soap_auth_create_users", $_POST["soap"]["create_users"]);
836  $ilSetting->set("soap_auth_allow_local", $_POST["soap"]["allow_local"]);
837  $ilSetting->set("soap_auth_account_mail", $_POST["soap"]["account_mail"]);
838  $ilSetting->set("soap_auth_use_https", $_POST["soap"]["use_https"]);
839  $ilSetting->set("soap_auth_use_dotnet", $_POST["soap"]["use_dotnet"]);
840  $ilSetting->set("soap_auth_user_default_role", $_POST["soap"]["user_default_role"]);
841  ilUtil::sendSuccess($this->lng->txt("auth_soap_settings_saved"),true);
842 
843  $this->ctrl->redirect($this,'editSOAP');
844  }
845 
851  function editScriptObject()
852  {
853  global $rbacsystem;
854 
855  if (!$rbacsystem->checkAccess("write",$this->object->getRefId()))
856  {
857  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
858  }
859 
860  if ($_SESSION["error_post_vars"])
861  {
862  $this->tpl->setVariable("AUTH_SCRIPT_NAME", $_SESSION["error_post_vars"]["auth_script"]["name"]);
863  }
864  else
865  {
866  // set already saved data
867  $settings = $this->ilias->getAllSettings();
868 
869  $this->tpl->setVariable("AUTH_SCRIPT_NAME", $settings["auth_script_name"]);
870  }
871 
872  $this->tabs_gui->setTabActive('auth_script');
873 
874  $this->getTemplateFile("script");
875 
876  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
877  $this->tpl->setVariable("COLSPAN", 3);
878  $this->tpl->setVariable("TXT_AUTH_SCRIPT_TITLE", $this->lng->txt("auth_script_configure"));
879  $this->tpl->setVariable("TXT_OPTIONS", $this->lng->txt("options"));
880  $this->tpl->setVariable("TXT_AUTH_SCRIPT_NAME", $this->lng->txt("auth_script_name"));
881 
882  $this->tpl->setVariable("TXT_REQUIRED_FLD", $this->lng->txt("required_field"));
883  $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
884  $this->tpl->setVariable("TXT_SUBMIT", $this->lng->txt("save"));
885  $this->tpl->setVariable("CMD_SUBMIT", "saveScript");
886  }
887 
893  function saveScriptObject()
894  {
895  // validate required data
896  if (!$_POST["auth_script"]["name"])
897  {
898  $this->ilias->raiseError($this->lng->txt("fill_out_all_required_fields"),$this->ilias->error_obj->MESSAGE);
899  }
900 
901  // validate script url
902  /*
903  if (( TODO ,$_POST["ldap"]["server"])) == false)
904  {
905  $this->ilias->raiseError($this->lng->txt("err_invalid_server"),$this->ilias->error_obj->MESSAGE);
906  }*/
907 
908  // TODO: check connection to server
909 
910  // all ok. save settings and activate auth by external script
911  $this->ilias->setSetting("auth_script_name", $_POST["auth_script"]["name"]);
912  $this->ilias->setSetting("auth_mode", AUTH_SCRIPT);
913 
914  ilUtil::sendSuccess($this->lng->txt("auth_mode_changed_to")." ".$this->getAuthModeTitle(),true);
915  $this->ctrl->redirect($this,'editScript');
916  }
917 
918 
925  function getAuthModeTitle()
926  {
927  switch ($this->ilias->getSetting("auth_mode"))
928  {
929  case AUTH_LOCAL:
930  return $this->lng->txt("auth_local");
931  break;
932 
933  case AUTH_LDAP:
934  return $this->lng->txt("auth_ldap");
935  break;
936 
937  case AUTH_SHIBBOLETH:
938  return $this->lng->txt("auth_shib");
939  break;
940 
941  case AUTH_RADIUS:
942  return $this->lng->txt("auth_radius");
943  break;
944 
945  case AUTH_SCRIPT:
946  return $this->lng->txt("auth_script");
947  break;
948 
949  default:
950  return $this->lng->txt("unknown");
951  break;
952  }
953  }
954 
956  {
957  global $rbacsystem;
958 
959  if (!$rbacsystem->checkAccess("write",$this->object->getRefId()))
960  {
961  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
962  }
963 
964  include_once('./Services/AccessControl/classes/class.ilObjRole.php');
966 
967  ilUtil::sendSuccess($this->lng->txt("auth_mode_roles_changed"),true);
968  $this->ctrl->redirect($this,'authSettings');
969  }
970 
976  protected function initAuthModeDetermination()
977  {
978  if(is_object($this->form))
979  {
980  return true;
981  }
982  // Are there any authentication methods that support automatic determination ?
983 
984  include_once('Services/Authentication/classes/class.ilAuthModeDetermination.php');
986  if($det->getCountActiveAuthModes() <= 1)
987  {
988  return false;
989  }
990 
991  include_once('./Services/Form/classes/class.ilPropertyFormGUI.php');
992  $this->form = new ilPropertyFormGUI();
993  $this->form->setFormAction($this->ctrl->getFormAction($this));
994  $this->form->setTableWidth('100%');
995  $this->form->setTitle($this->lng->txt('auth_auth_mode_determination'));
996  $this->form->addCommandButton('updateAuthModeDetermination',$this->lng->txt('save'));
997  $this->form->addCommandButton('authSettings',$this->lng->txt('cancel'));
998 
999  $kind = new ilRadioGroupInputGUI($this->lng->txt('auth_kind_determination'),'kind');
1000  $kind->setInfo($this->lng->txt('auth_mode_determination_info'));
1001  $kind->setValue($det->getKind());
1002  $kind->setRequired(true);
1003 
1004  $option_user = new ilRadioOption($this->lng->txt('auth_by_user'),0);
1005  $kind->addOption($option_user);
1006 
1007  $option_determination = new ilRadioOption($this->lng->txt('auth_automatic'),1);
1008 
1009  include_once('Services/Authentication/classes/class.ilAuthUtils.php');
1010 
1011  $auth_sequenced = $det->getAuthModeSequence();
1012  $counter = 1;
1013  foreach($auth_sequenced as $auth_mode)
1014  {
1015  switch($auth_mode)
1016  {
1017  case AUTH_LDAP:
1018  $text = $this->lng->txt('auth_ldap');
1019  break;
1020  case AUTH_RADIUS:
1021  $text = $this->lng->txt('auth_radius');
1022  break;
1023  case AUTH_LOCAL:
1024  $text = $this->lng->txt('auth_local');
1025  break;
1026  case AUTH_SOAP:
1027  $text = $this->lng->txt('auth_soap');
1028  break;
1029  }
1030 
1031 
1032  $pos = new ilTextInputGUI($text,'position['.$auth_mode.']');
1033  $pos->setValue($counter++);
1034  $pos->setSize(1);
1035  $pos->setMaxLength(1);
1036  $option_determination->addSubItem($pos);
1037  }
1038  $kind->addOption($option_determination);
1039  $this->form->addItem($kind);
1040  return true;
1041  }
1042 
1050  {
1051  include_once('Services/Authentication/classes/class.ilAuthModeDetermination.php');
1053 
1054  $det->setKind((int) $_POST['kind']);
1055 
1056  $pos = $_POST['position'] ? $_POST['position'] : array();
1057  asort($pos,SORT_NUMERIC);
1058 
1059  $counter = 0;
1060  foreach($pos as $auth_mode => $dummy)
1061  {
1062  $position[$counter++] = $auth_mode;
1063  }
1064  $det->setAuthModeSequence($position ? $position : array());
1065  $det->save();
1066 
1067  ilUtil::sendSuccess($this->lng->txt('settings_saved'));
1068  $this->authSettingsObject();
1069  }
1070 
1071 
1072  function &executeCommand()
1073  {
1074  global $ilAccess,$ilErr;
1075 
1076  $next_class = $this->ctrl->getNextClass($this);
1077  $cmd = $this->ctrl->getCmd();
1078  $this->prepareOutput();
1079 
1080 
1081  if(!$ilAccess->checkAccess('read','',$this->object->getRefId()))
1082  {
1083  $ilErr->raiseError($this->lng->txt('msg_no_perm_read'),$ilErr->WARNING);
1084  }
1085 
1086  switch($next_class)
1087  {
1088  case 'ilregistrationsettingsgui':
1089 
1090  include_once './Services/Registration/classes/class.ilRegistrationSettingsGUI.php';
1091 
1092  // Enable tabs
1093  $this->tabs_gui->setTabActive('registration_settings');
1094  $registration_gui =& new ilRegistrationSettingsGUI();
1095  $this->ctrl->forwardCommand($registration_gui);
1096  break;
1097 
1098  case 'ilpermissiongui':
1099 
1100  // Enable tabs
1101  $this->tabs_gui->setTabActive('perm_settings');
1102 
1103  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
1104  $perm_gui =& new ilPermissionGUI($this);
1105  $ret =& $this->ctrl->forwardCommand($perm_gui);
1106  break;
1107 
1108  case 'illdapsettingsgui':
1109 
1110  // Enable Tabs
1111  $this->tabs_gui->setTabActive('auth_ldap');
1112 
1113  include_once './Services/LDAP/classes/class.ilLDAPSettingsGUI.php';
1114  $ldap_settings_gui = new ilLDAPSettingsGUI($this->object->getRefId());
1115  $this->ctrl->forwardCommand($ldap_settings_gui);
1116  break;
1117 
1118  case 'ilauthshibbolethsettingsgui':
1119 
1120  $this->tabs_gui->setTabActive('auth_shib');
1121  include_once('./Services/AuthShibboleth/classes/class.ilAuthShibbolethSettingsGUI.php');
1122  $shib_settings_gui = new ilAuthShibbolethSettingsGUI($this->object->getRefId());
1123  $this->ctrl->forwardCommand($shib_settings_gui);
1124  break;
1125 
1126  case 'ilradiussettingsgui':
1127 
1128  $this->tabs_gui->setTabActive('auth_radius');
1129  include_once './Services/Radius/classes/class.ilRadiusSettingsGUI.php';
1130  $radius_settings_gui = new ilRadiusSettingsGUI($this->object->getRefId());
1131  $this->ctrl->forwardCommand($radius_settings_gui);
1132  break;
1133 
1134 
1135  default:
1136  if(!$cmd)
1137  {
1138  $cmd = "authSettings";
1139  }
1140  $cmd .= "Object";
1141  $this->$cmd();
1142 
1143  break;
1144  }
1145  return true;
1146  }
1147 
1148  function getAdminTabs(&$tabs_gui)
1149  {
1150  $this->getTabs($tabs_gui);
1151  }
1152 
1158  function getTabs(&$tabs_gui)
1159  {
1160  global $rbacsystem;
1161 
1162  $this->ctrl->setParameter($this,"ref_id",$this->object->getRefId());
1163 
1164  if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
1165  {
1166 
1167  $tabs_gui->addTarget('registration_settings',
1168  $this->ctrl->getLinkTargetByClass('ilregistrationsettingsgui','view'));
1169 
1170  $tabs_gui->addTarget("authentication_settings", $this->ctrl->getLinkTarget($this, "authSettings"),
1171  "", "", "");
1172 
1173  $tabs_gui->addTarget("auth_ldap", $this->ctrl->getLinkTargetByClass('illdapsettingsgui','serverList'),
1174  "", "", "");
1175 
1176 
1177  #$tabs_gui->addTarget("auth_ldap", $this->ctrl->getLinkTarget($this, "editLDAP"),
1178  # "", "", "");
1179 
1180  $tabs_gui->addTarget('auth_shib',$this->ctrl->getLinkTargetByClass('ilauthshibbolethsettingsgui','settings'));
1181 
1182  $tabs_gui->addTarget("auth_cas", $this->ctrl->getLinkTarget($this, "editCAS"),
1183  "", "", "");
1184 
1185  $tabs_gui->addTarget("auth_radius", $this->ctrl->getLinkTargetByClass('ilradiussettingsgui', "settings"),
1186  "", "", "");
1187 
1188  $tabs_gui->addTarget("auth_soap", $this->ctrl->getLinkTarget($this, "editSOAP"),
1189  "", "", "");
1190 
1191  }
1192 
1193  if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
1194  {
1195  $tabs_gui->addTarget("perm_settings",
1196  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
1197  array("perm","info","owner"), 'ilpermissiongui');
1198  }
1199  }
1200 
1204  function setSubTabs($a_tab)
1205  {
1206  global $rbacsystem,$ilUser,$ilAccess;
1207 
1208  switch ($a_tab)
1209  {
1210  case 'authSettings':
1211  if($ilAccess->checkAccess('write','',$this->object->getRefId()))
1212  {
1213  $this->tabs_gui->addSubTabTarget("auth_settings",
1214  $this->ctrl->getLinkTarget($this,'authSettings'),
1215  "");
1216  }
1217 
1218  if($ilAccess->checkAccess('write','',$this->object->getRefId()))
1219  {
1220  $this->tabs_gui->addSubTabTarget("login_information",
1221  $this->ctrl->getLinkTarget($this,'loginInfo'),
1222  "");
1223  }
1224  break;
1225  }
1226  }
1227 } // END class.ilObjAuthSettingsGUI
1228 ?>