diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2014-05-13 19:47:00 +0400 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2014-05-13 19:47:00 +0400 |
commit | 68434510bd8cea6ff3ebb03a7e366844aed1e743 (patch) | |
tree | 5bf79b62a076a6d464190b7ce836c6229ab79a57 /apps/user_ldap | |
parent | 1e6b4576c2a99290f78b48a45c317a8b262d649f (diff) |
LDAP: set filter mode to raw, so filters will not be changed and broken after upgrade from oc5, when visiting the LDAP settings and opening filter tabs
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/appinfo/update.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/user_ldap/appinfo/update.php b/apps/user_ldap/appinfo/update.php index 41770cf97b1..073e8be7fe8 100644 --- a/apps/user_ldap/appinfo/update.php +++ b/apps/user_ldap/appinfo/update.php @@ -7,6 +7,12 @@ if($state === 'unset') { OCP\Config::setSystemValue('ldapIgnoreNamingRules', false); } +$installedVersion = OCP\Config::getAppValue('files_sharing', 'installed_version'); +$enableRawMode = false; +if (version_compare($installedVersion, '0.4.1', '<')) { + $enableRawMode = true; +} + $configPrefixes = OCA\user_ldap\lib\Helper::getServerConfigurationPrefixes(true); $ldap = new OCA\user_ldap\lib\LDAP(); foreach($configPrefixes as $config) { @@ -24,4 +30,10 @@ foreach($configPrefixes as $config) { $config.'ldap_expert_uuid_user_attr', $value); \OCP\Config::setAppValue('user_ldap', $config.'ldap_expert_uuid_group_attr', $value); + + if($enableRawMode) { + \OCP\Config::setAppValue('user_ldap', $config.'ldap_user_filter_mode', 1); + \OCP\Config::setAppValue('user_ldap', $config.'ldap_login_filter_mode', 1); + \OCP\Config::setAppValue('user_ldap', $config.'ldap_group_filter_mode', 1); + } } |