*
*/
-\OC::$server->registerService('LDAPUserPluginManager', function () {
- return new OCA\User_LDAP\UserPluginManager();
-});
-\OC::$server->registerService('LDAPGroupPluginManager', function () {
- return new OCA\User_LDAP\GroupPluginManager();
-});
-
$app = \OC::$server->query(\OCA\User_LDAP\AppInfo\Application::class);
$helper = new \OCA\User_LDAP\Helper(\OC::$server->getConfig());
$notificationManager->registerNotifierService(\OCA\User_LDAP\Notification\Notifier::class);
$userSession = \OC::$server->getUserSession();
- $userPluginManager = \OC::$server->query('LDAPUserPluginManager');
- $groupPluginManager = \OC::$server->query('LDAPGroupPluginManager');
+ $userPluginManager = \OC::$server->query(\OCA\User_LDAP\UserPluginManager::class);
+ $groupPluginManager = \OC::$server->query(\OCA\User_LDAP\GroupPluginManager::class);
$userBackend = new OCA\User_LDAP\User_Proxy(
$configPrefixes, $ldapWrapper, $ocConfig, $notificationManager, $userSession, $userPluginManager
$ocConfig,
\OC::$server->getNotificationManager(),
\OC::$server->getUserSession(),
- \OC::$server->query('LDAPUserPluginManager')
+ \OC::$server->query(\OCA\User_LDAP\UserPluginManager::class)
);
$deletedUsersIndex = new DeletedUsersIndex(
$ocConfig, $dbConnection, $userMapping
namespace OCA\User_LDAP\Command;
use OCA\User_LDAP\Group_Proxy;
+use OCA\User_LDAP\GroupPluginManager;
use OCA\User_LDAP\Helper;
use OCA\User_LDAP\LDAP;
use OCA\User_LDAP\User_Proxy;
+use OCA\User_LDAP\UserPluginManager;
use OCP\IConfig;
use Symfony\Component\Console\Command\Command;
$this->validateOffsetAndLimit($offset, $limit);
if ($input->getOption('group')) {
- $proxy = new Group_Proxy($configPrefixes, $ldapWrapper, \OC::$server->query('LDAPGroupPluginManager'));
+ $proxy = new Group_Proxy($configPrefixes, $ldapWrapper, \OC::$server->query(GroupPluginManager::class));
$getMethod = 'getGroups';
$printID = false;
// convert the limit of groups to null. This will show all the groups available instead of
$this->ocConfig,
\OC::$server->getNotificationManager(),
\OC::$server->getUserSession(),
- \OC::$server->query('LDAPUserPluginManager')
+ \OC::$server->query(UserPluginManager::class)
);
$getMethod = 'getDisplayNames';
$printID = true;
$notificationManager = \OC::$server->getNotificationManager();
$userSession = \OC::$server->getUserSession();
- $userPluginManager = \OC::$server->query('LDAPUserPluginManager');
+ $userPluginManager = \OC::$server->query(UserPluginManager::class);
$userBackend = new User_Proxy(
$configPrefixes, $ldapWrapper, $ocConfig, $notificationManager, $userSession, $userPluginManager
use OCA\User_LDAP\User\DeletedUsersIndex;
use OCA\User_LDAP\User_LDAP;
use OCA\User_LDAP\User_Proxy;
+use OCA\User_LDAP\UserPluginManager;
/**
* Class CleanUp
$this->ocConfig,
\OC::$server->getNotificationManager(),
\OC::$server->getUserSession(),
- \OC::$server->query('LDAPUserPluginManager')
+ \OC::$server->query(UserPluginManager::class)
);
}
use OCA\User_LDAP\Access;
use OCA\User_LDAP\Connection;
use OCA\User_LDAP\FilesystemHelper;
+use OCA\User_LDAP\GroupPluginManager;
use OCA\User_LDAP\Helper;
use OCA\User_LDAP\LDAP;
use OCA\User_LDAP\LogWrapper;
$userMapper = new UserMapping($dbc);
$ldapAccess->setGroupMapper($groupMapper);
$ldapAccess->setUserMapper($userMapper);
- self::$groupBE = new \OCA\User_LDAP\Group_LDAP($ldapAccess, \OC::$server->query('LDAPGroupPluginManager'));
+ self::$groupBE = new \OCA\User_LDAP\Group_LDAP($ldapAccess, \OC::$server->query(GroupPluginManager::class));
} else {
- self::$groupBE = new \OCA\User_LDAP\Group_Proxy($configPrefixes, $ldapWrapper, \OC::$server->query('LDAPGroupPluginManager'));
+ self::$groupBE = new \OCA\User_LDAP\Group_Proxy($configPrefixes, $ldapWrapper, \OC::$server->query(GroupPluginManager::class));
}
return self::$groupBE;
use OCA\User_LDAP\LDAP;
use OCA\User_LDAP\Mapping\GroupMapping;
use OCA\User_LDAP\User_Proxy;
+use OCA\User_LDAP\UserPluginManager;
use OCP\IConfig;
class UUIDFixGroup extends UUIDFix {
$this->mapper = $mapper;
$this->proxy = new User_Proxy($helper->getServerConfigurationPrefixes(true), $ldap, $config,
\OC::$server->getNotificationManager(), \OC::$server->getUserSession(),
- \OC::$server->query('LDAPUserPluginManager'));
+ \OC::$server->query(UserPluginManager::class));
}
}
namespace OCA\User_LDAP\Migration;
use OCA\User_LDAP\Group_Proxy;
+use OCA\User_LDAP\GroupPluginManager;
use OCA\User_LDAP\Helper;
use OCA\User_LDAP\LDAP;
use OCA\User_LDAP\Mapping\UserMapping;
class UUIDFixUser extends UUIDFix {
public function __construct(UserMapping $mapper, LDAP $ldap, IConfig $config, Helper $helper) {
$this->mapper = $mapper;
- $groupPluginManager = \OC::$server->query('LDAPGroupPluginManager');
+ $groupPluginManager = \OC::$server->query(GroupPluginManager::class);
$this->proxy = new Group_Proxy($helper->getServerConfigurationPrefixes(true), $ldap, $groupPluginManager);
}
}
use OCA\User_LDAP\Access;
use OCA\User_LDAP\Connection;
use OCA\User_LDAP\FilesystemHelper;
+use OCA\User_LDAP\GroupPluginManager;
use OCA\User_LDAP\Helper;
use OCA\User_LDAP\LDAP;
use OCA\User_LDAP\LogWrapper;
use OCA\User_LDAP\User\Manager;
+use OCA\User_LDAP\UserPluginManager;
abstract class AbstractIntegrationTest {
/** @var LDAP */
/** @var Manager */
protected $userManager;
-
+
/** @var Helper */
protected $helper;
* the LDAP backend.
*/
public function init() {
- \OC::$server->registerService('LDAPUserPluginManager', function () {
+ \OC::$server->registerService(UserPluginManager::class, function () {
return new \OCA\User_LDAP\UserPluginManager();
});
- \OC::$server->registerService('LDAPGroupPluginManager', function () {
+ \OC::$server->registerService(GroupPluginManager::class, function () {
return new \OCA\User_LDAP\GroupPluginManager();
});
\OC::$server->getNotificationManager()
);
}
-
+
/**
* initializes the test Helper
*/
namespace OCA\user_ldap\tests\Integration\Lib;
use OCA\User_LDAP\Group_LDAP;
+use OCA\User_LDAP\GroupPluginManager;
use OCA\User_LDAP\Mapping\GroupMapping;
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest;
use OCA\User_LDAP\User_LDAP;
+use OCA\User_LDAP\UserPluginManager;
require_once __DIR__ . '/../Bootstrap.php';
$groupMapper->clear();
$this->access->setGroupMapper($groupMapper);
- $userBackend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager(), \OC::$server->getUserSession(), \OC::$server->query('LDAPUserPluginManager'));
+ $userBackend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager(), \OC::$server->getUserSession(), \OC::$server->query(UserPluginManager::class));
$userManager = \OC::$server->getUserManager();
$userManager->clearBackends();
$userManager->registerBackend($userBackend);
- $groupBackend = new Group_LDAP($this->access, \OC::$server->query('LDAPGroupPluginManager'));
+ $groupBackend = new Group_LDAP($this->access, \OC::$server->query(GroupPluginManager::class));
$groupManger = \OC::$server->getGroupManager();
$groupManger->clearBackends();
$groupManger->addBackend($groupBackend);
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest;
use OCA\User_LDAP\User_LDAP;
+use OCA\User_LDAP\UserPluginManager;
require_once __DIR__ . '/../Bootstrap.php';
$this->mapping = new UserMapping(\OC::$server->getDatabaseConnection());
$this->mapping->clear();
$this->access->setUserMapper($this->mapping);
- $this->backend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager(), \OC::$server->getUserSession(), \OC::$server->query('LDAPUserPluginManager'));
+ $this->backend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager(), \OC::$server->getUserSession(), \OC::$server->query(UserPluginManager::class));
}
/**
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest;
use OCA\User_LDAP\User_LDAP;
+use OCA\User_LDAP\UserPluginManager;
require_once __DIR__ . '/../Bootstrap.php';
require(__DIR__ . '/../setup-scripts/createExplicitUsers.php');
parent::init();
- $this->backend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager(), \OC::$server->getUserSession(), \OC::$server->query('LDAPUserPluginManager'));
+ $this->backend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager(), \OC::$server->getUserSession(), \OC::$server->query(UserPluginManager::class));
}
public function initConnection() {
use OCA\User_LDAP\User\Manager;
use OCA\User_LDAP\User\User;
use OCA\User_LDAP\User_LDAP;
+use OCA\User_LDAP\UserPluginManager;
use OCP\Image;
require_once __DIR__ . '/../../Bootstrap.php';
$this->mapping = new UserMapping(\OC::$server->getDatabaseConnection());
$this->mapping->clear();
$this->access->setUserMapper($this->mapping);
- $userBackend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager(), \OC::$server->getUserSession(), \OC::$server->query('LDAPUserPluginManager'));
+ $userBackend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager(), \OC::$server->getUserSession(), \OC::$server->query(UserPluginManager::class));
\OC_User::useBackend($userBackend);
}
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest;
use OCA\User_LDAP\User_LDAP;
+use OCA\User_LDAP\UserPluginManager;
require_once __DIR__ . '/../../Bootstrap.php';
$this->mapping->clear();
$this->access->setUserMapper($this->mapping);
- $userBackend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager(), \OC::$server->getUserSession(), \OC::$server->query('LDAPUserPluginManager'));
+ $userBackend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager(), \OC::$server->getUserSession(), \OC::$server->query(UserPluginManager::class));
\OC_User::useBackend($userBackend);
}
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest;
use OCA\User_LDAP\User_LDAP;
+use OCA\User_LDAP\UserPluginManager;
require_once __DIR__ . '/../../Bootstrap.php';
$this->mapping = new UserMapping(\OC::$server->getDatabaseConnection());
$this->mapping->clear();
$this->access->setUserMapper($this->mapping);
- $userBackend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager(), \OC::$server->getUserSession(), \OC::$server->query('LDAPUserPluginManager'));
+ $userBackend = new User_LDAP($this->access, \OC::$server->getConfig(), \OC::$server->getNotificationManager(), \OC::$server->getUserSession(), \OC::$server->query(UserPluginManager::class));
\OC_User::useBackend($userBackend);
}