Commit 642ec8e3 authored by blizzz's avatar blizzz
Browse files

Merge pull request #18244 from owncloud/fix-issue-17677

Fix 17677 - Remove LDAP case sensitive checkbox
parents 3d9a1dd7 4b04412d
......@@ -33,7 +33,7 @@ $prefix = (string)$_POST['ldap_serverconfig_chooser'];
// only legacy checkboxes (Advanced and Expert tab) need to be handled here,
// the Wizard-like tabs handle it on their own
$chkboxes = array('ldap_configuration_active', 'ldap_override_main_server',
'ldap_nocase', 'ldap_turn_off_cert_check');
'ldap_turn_off_cert_check');
foreach($chkboxes as $boxid) {
if(!isset($_POST[$boxid])) {
$_POST[$boxid] = 0;
......
......@@ -24,3 +24,13 @@ $installedVersion = \OC::$server->getConfig()->getAppValue('user_ldap', 'install
if (version_compare($installedVersion, '0.6.1', '<')) {
\OC::$server->getConfig()->setAppValue('user_ldap', 'enforce_home_folder_naming_rule', false);
}
if(version_compare($installedVersion, '0.6.2', '<')) {
// Remove LDAP case insensitive setting from DB as it is no longer beeing used.
$helper = new \OCA\user_ldap\lib\Helper();
$prefixes = $helper->getServerConfigurationPrefixes();
foreach($prefixes as $prefix) {
\OC::$server->getConfig()->deleteAppValue('user_ldap', $prefix . "ldap_nocase");
}
}
......@@ -41,10 +41,6 @@ OCA = OCA || {};
$element: $('#ldap_override_main_server'),
setMethod: 'setOverrideMainServerState'
},
ldap_nocase: {
$element: $('#ldap_nocase'),
setMethod: 'setNoCase'
},
ldap_turn_off_cert_check: {
$element: $('#ldap_turn_off_cert_check'),
setMethod: 'setCertCheckDisabled'
......@@ -165,16 +161,6 @@ OCA = OCA || {};
);
},
/**
* whether the server is case insensitive. This setting does not play
* a role anymore (probably never had).
*
* @param {string} noCase contains an int
*/
setNoCase: function(noCase) {
this.setElementValue(this.managedItems.ldap_nocase.$element, noCase);
},
/**
* sets whether the SSL/TLS certification check shout be disabled
*
......
......@@ -43,7 +43,6 @@ class Configuration {
'ldapAgentName' => null,
'ldapAgentPassword' => null,
'ldapTLS' => null,
'ldapNoCase' => null,
'turnOffCertCheck' => null,
'ldapIgnoreNamingRules' => null,
'ldapUserDisplayName' => null,
......@@ -379,7 +378,6 @@ class Configuration {
'ldap_display_name' => 'displayName',
'ldap_group_display_name' => 'cn',
'ldap_tls' => 0,
'ldap_nocase' => 0,
'ldap_quota_def' => '',
'ldap_quota_attr' => '',
'ldap_email_attr' => '',
......@@ -436,7 +434,6 @@ class Configuration {
'ldap_display_name' => 'ldapUserDisplayName',
'ldap_group_display_name' => 'ldapGroupDisplayName',
'ldap_tls' => 'ldapTLS',
'ldap_nocase' => 'ldapNoCase',
'ldap_quota_def' => 'ldapQuotaDefault',
'ldap_quota_attr' => 'ldapQuotaAttribute',
'ldap_email_attr' => 'ldapEmailAttribute',
......
......@@ -78,7 +78,6 @@ style('user_ldap', 'settings');
<p><label for="ldap_backup_host"><?php p($l->t('Backup (Replica) Host'));?></label><input type="text" id="ldap_backup_host" name="ldap_backup_host" data-default="<?php p($_['ldap_backup_host_default']); ?>" title="<?php p($l->t('Give an optional backup host. It must be a replica of the main LDAP/AD server.'));?>"></p>
<p><label for="ldap_backup_port"><?php p($l->t('Backup (Replica) Port'));?></label><input type="number" id="ldap_backup_port" name="ldap_backup_port" data-default="<?php p($_['ldap_backup_port_default']); ?>" /></p>
<p><label for="ldap_override_main_server"><?php p($l->t('Disable Main Server'));?></label><input type="checkbox" id="ldap_override_main_server" name="ldap_override_main_server" value="1" data-default="<?php p($_['ldap_override_main_server_default']); ?>" title="<?php p($l->t('Only connect to the replica server.'));?>" /></p>
<p><label for="ldap_nocase"><?php p($l->t('Case insensitive LDAP server (Windows)'));?></label><input type="checkbox" id="ldap_nocase" name="ldap_nocase" data-default="<?php p($_['ldap_nocase_default']); ?>" value="1"<?php if (isset($_['ldap_nocase']) && ($_['ldap_nocase'])) p(' checked'); ?>></p>
<p><label for="ldap_turn_off_cert_check"><?php p($l->t('Turn off SSL certificate validation.'));?></label><input type="checkbox" id="ldap_turn_off_cert_check" name="ldap_turn_off_cert_check" title="<?php p($l->t('Not recommended, use it for testing only! If connection only works with this option, import the LDAP server\'s SSL certificate in your %s server.', $theme->getName() ));?>" data-default="<?php p($_['ldap_turn_off_cert_check_default']); ?>" value="1"><br/></p>
<p><label for="ldap_cache_ttl"><?php p($l->t('Cache Time-To-Live'));?></label><input type="number" id="ldap_cache_ttl" name="ldap_cache_ttl" title="<?php p($l->t('in seconds. A change empties the cache.'));?>" data-default="<?php p($_['ldap_cache_ttl_default']); ?>" /></p>
</div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment