aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/AccessFactory.php
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-06-20 14:44:02 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-06-28 18:00:39 +0200
commit14778811b4c019cfdc090a64e3baf0ab4bef9f8e (patch)
treef0394c2ec98ba3cde38f081f8496cc4b853136c6 /apps/user_ldap/lib/AccessFactory.php
parent4d6a21a3795355a4e94d60dcc468db81fdc4a47e (diff)
downloadnextcloud-server-14778811b4c019cfdc090a64e3baf0ab4bef9f8e.tar.gz
nextcloud-server-14778811b4c019cfdc090a64e3baf0ab4bef9f8e.zip
refactor: Use `IAppConfig` for setting cron type
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/user_ldap/lib/AccessFactory.php')
-rw-r--r--apps/user_ldap/lib/AccessFactory.php23
1 files changed, 11 insertions, 12 deletions
diff --git a/apps/user_ldap/lib/AccessFactory.php b/apps/user_ldap/lib/AccessFactory.php
index 2e5ee28d6d5..28f88e3c4e9 100644
--- a/apps/user_ldap/lib/AccessFactory.php
+++ b/apps/user_ldap/lib/AccessFactory.php
@@ -6,24 +6,22 @@
namespace OCA\User_LDAP;
use OCA\User_LDAP\User\Manager;
+use OCP\IAppConfig;
use OCP\IConfig;
use OCP\IUserManager;
use OCP\Server;
use Psr\Log\LoggerInterface;
class AccessFactory {
- private ILDAPWrapper $ldap;
- private Helper $helper;
- private IConfig $config;
- private IUserManager $ncUserManager;
- private LoggerInterface $logger;
public function __construct(
- ILDAPWrapper $ldap,
- Helper $helper,
- IConfig $config,
- IUserManager $ncUserManager,
- LoggerInterface $logger) {
+ private ILDAPWrapper $ldap,
+ private Helper $helper,
+ private IConfig $config,
+ private IAppConfig $appConfig,
+ private IUserManager $ncUserManager,
+ private LoggerInterface $logger,
+ ) {
$this->ldap = $ldap;
$this->helper = $helper;
$this->config = $config;
@@ -34,13 +32,14 @@ class AccessFactory {
public function get(Connection $connection): Access {
/* Each Access instance gets its own Manager instance, see OCA\User_LDAP\AppInfo\Application::register() */
return new Access(
- $connection,
$this->ldap,
+ $connection,
Server::get(Manager::class),
$this->helper,
$this->config,
$this->ncUserManager,
- $this->logger
+ $this->logger,
+ $this->appConfig,
);
}
}