From bfd5b6b2e59ba6fa00ef81fc045d722096bf07b5 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 10 Oct 2019 17:09:32 +0200 Subject: [PATCH] set auth_type=univention for account_repository=univention (was ldap) --- api/setup/setup.inc.php | 2 +- api/setup/tables_update.inc.php | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/api/setup/setup.inc.php b/api/setup/setup.inc.php index 0d82bd8dde..e4f80fac7a 100644 --- a/api/setup/setup.inc.php +++ b/api/setup/setup.inc.php @@ -11,7 +11,7 @@ /* Basic information about this app */ $setup_info['api']['name'] = 'api'; $setup_info['api']['title'] = 'EGroupware API'; -$setup_info['api']['version'] = '19.1.001'; +$setup_info['api']['version'] = '19.1.002'; $setup_info['api']['versions']['current_header'] = '1.29'; // maintenance release in sync with changelog in doc/rpm-build/debian.changes $setup_info['api']['versions']['maintenance_release'] = '19.1.20190925'; diff --git a/api/setup/tables_update.inc.php b/api/setup/tables_update.inc.php index 40e23322cf..53efbddcf3 100644 --- a/api/setup/tables_update.inc.php +++ b/api/setup/tables_update.inc.php @@ -676,3 +676,19 @@ function api_upgrade19_1() } return $GLOBALS['setup_info']['api']['currentver'] = '19.1.001'; } + +/** + * Set auth_type=univention for account_repository=univention (was ldap) + * + * @return string + */ +function api_upgrade19_1_001() +{ + $config = Api\Config::read('phpgwapi'); + + if ($config['account_repository'] === 'univention' && $config['auth_type'] !== 'univention') + { + Api\Config::save_value('auth_type', 'univention', 'phpgwapi'); + } + return $GLOBALS['setup_info']['api']['currentver'] = '19.1.002'; +}