set auth_type=univention for account_repository=univention (was ldap)

This commit is contained in:
Ralf Becker 2019-10-10 17:09:32 +02:00
parent 45a62a3b5d
commit bfd5b6b2e5
2 changed files with 17 additions and 1 deletions

View File

@ -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';

View File

@ -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';
}