From a0d8f90e57b08a73a6b0341d51662152060a78c6 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Wed, 10 Feb 2016 19:45:42 -0500 Subject: Add constant to enable/disable database group provider --- app/ServiceProvider/GroupProvider.php | 5 ++++- app/constants.php | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/ServiceProvider/GroupProvider.php b/app/ServiceProvider/GroupProvider.php index dff4b23a..b222b218 100644 --- a/app/ServiceProvider/GroupProvider.php +++ b/app/ServiceProvider/GroupProvider.php @@ -26,7 +26,10 @@ class GroupProvider implements ServiceProviderInterface public function register(Container $container) { $container['groupManager'] = new GroupManager; - $container['groupManager']->register(new DatabaseBackendGroupProvider($container)); + + if (DB_GROUP_PROVIDER) { + $container['groupManager']->register(new DatabaseBackendGroupProvider($container)); + } if (LDAP_AUTH && LDAP_GROUP_PROVIDER) { $container['groupManager']->register(new LdapBackendGroupProvider($container)); diff --git a/app/constants.php b/app/constants.php index be9bb6a7..1740494e 100644 --- a/app/constants.php +++ b/app/constants.php @@ -23,6 +23,9 @@ defined('DB_HOSTNAME') or define('DB_HOSTNAME', 'localhost'); defined('DB_NAME') or define('DB_NAME', 'kanboard'); defined('DB_PORT') or define('DB_PORT', null); +// Database backend group provider +defined('DB_GROUP_PROVIDER') or define('DB_GROUP_PROVIDER', true); + // LDAP configuration defined('LDAP_AUTH') or define('LDAP_AUTH', false); defined('LDAP_SERVER') or define('LDAP_SERVER', ''); -- cgit v1.2.3