MDL-9399 auth/ldap: Manage 2 new config settings for NTLM SSO

Changes in the forms and forms handling to set and edit NTLM SSO
related config options.
This commit is contained in:
martinlanghoff
2007-11-14 23:35:46 +00:00
parent 6d3da6bf92
commit 04038968be
2 changed files with 36 additions and 0 deletions
+6
View File
@@ -1803,6 +1803,10 @@ class auth_plugin_ldap extends auth_plugin_base {
{$config->changepasswordurl = ''; }
if (!isset($config->removeuser))
{$config->removeuser = 0; }
if (!isset($config->ntlmsso_enabled))
{$config->ntlmsso_enabled = 0; }
if (!isset($config->ntlmsso_subnet))
{$config->ntlmsso_subnet = ''; }
// save settings
set_config('host_url', $config->host_url, 'auth/ldap');
@@ -1833,6 +1837,8 @@ class auth_plugin_ldap extends auth_plugin_base {
set_config('passtype', $config->passtype, 'auth/ldap');
set_config('changepasswordurl', $config->changepasswordurl, 'auth/ldap');
set_config('removeuser', $config->removeuser, 'auth/ldap');
set_config('ntlmsso_enabled', (int)$config->ntlmsso_enabled, 'auth/ldap');
set_config('ntlmsso_subnet', $config->ntlmsso_subnet, 'auth/ldap');
return true;
}
+30
View File
@@ -55,6 +55,10 @@
{$config->changepasswordurl = ''; }
if (!isset($config->removeuser))
{$config->removeuser = 0; }
if (!isset($config->ntlmsso_enabled))
{$config->ntlmsso_enabled = 0; }
if (!isset($config->ntlmsso_subnet))
{$config->ntlmsso_subnet = ''; }
$yesno = array( get_string('no'), get_string('yes') );
@@ -439,6 +443,32 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
</td>
</tr>
<tr>
<td colspan="2">
<h4><?php print_string('auth_ntlmsso', 'auth') ?> </h4>
</td>
</tr>
<tr valign="top">
<td align="right"><label for="ntlmsso_enabled"><?php print_string('auth_ntlmsso_enabled_key','auth') ?></label></td>
<td>
<?php
choose_from_menu($yesno, 'ntlmsso_enabled', $config->ntlmsso_enabled, '0');
?>
</td>
<td>
<?php print_string('auth_ntlmsso_enabled','auth') ?>
</td>
</tr>
<tr valign="top">
<td align="right"><label for="ntlmsso_subnet"><?php print_string('auth_ntlmsso_subnet_key','auth') ?></label></td>
<td><input name="ntlmsso_subnet" id="ntlmsso_subnet" type="text" size="30" value="<?php p($config->ntlmsso_subnet) ?>"
</td>
<td>
<?php print_string('auth_ntlmsso_subnet','auth') ?>
</td>
</tr>
<?php
$help = get_string('auth_ldapextrafields','auth');