[Pkg-owncloud-commits] [owncloud] 13/85: 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

David Prévot taffit at moszumanska.debian.org
Tue Jun 17 19:12:40 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch 6.0
in repository owncloud.

commit 68434510bd8cea6ff3ebb03a7e366844aed1e743
Author: Arthur Schiwon <blizzz at owncloud.com>
Date:   Tue May 13 17:47:00 2014 +0200

    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
---
 apps/user_ldap/appinfo/update.php | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/apps/user_ldap/appinfo/update.php b/apps/user_ldap/appinfo/update.php
index 41770cf..073e8be 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);
+	}
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list