diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-10-22 11:25:33 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-10-23 12:25:31 +0200 |
commit | 86e5e7d9274241b0373bfa494896534b251e1978 (patch) | |
tree | 93bf7a5cee299889b8143304537265b1a5553b33 /apps/user_ldap/lib/Migration | |
parent | 872f03209cccd376c0be908581164f245e558070 (diff) | |
download | nextcloud-server-86e5e7d9274241b0373bfa494896534b251e1978.tar.gz nextcloud-server-86e5e7d9274241b0373bfa494896534b251e1978.zip |
LDAP simplify User_Proxy and Group_Proxy signatures
- make User_Proxy and Group_Proxy easy to instantiate
- simplify dependent code
- move commands to info.xml
- make UpdateGroups job class non-static
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/user_ldap/lib/Migration')
-rw-r--r-- | apps/user_ldap/lib/Migration/UUIDFix.php | 7 | ||||
-rw-r--r-- | apps/user_ldap/lib/Migration/UUIDFixGroup.php | 12 | ||||
-rw-r--r-- | apps/user_ldap/lib/Migration/UUIDFixUser.php | 11 |
3 files changed, 6 insertions, 24 deletions
diff --git a/apps/user_ldap/lib/Migration/UUIDFix.php b/apps/user_ldap/lib/Migration/UUIDFix.php index 8648f979211..ba2264c3c63 100644 --- a/apps/user_ldap/lib/Migration/UUIDFix.php +++ b/apps/user_ldap/lib/Migration/UUIDFix.php @@ -50,11 +50,4 @@ abstract class UUIDFix extends QueuedJob { } } } - - /** - * @param Proxy $proxy - */ - public function overrideProxy(Proxy $proxy) { - $this->proxy = $proxy; - } } diff --git a/apps/user_ldap/lib/Migration/UUIDFixGroup.php b/apps/user_ldap/lib/Migration/UUIDFixGroup.php index b40cc8881e6..2cf961f550a 100644 --- a/apps/user_ldap/lib/Migration/UUIDFixGroup.php +++ b/apps/user_ldap/lib/Migration/UUIDFixGroup.php @@ -26,18 +26,12 @@ namespace OCA\User_LDAP\Migration; -use OCA\User_LDAP\Helper; -use OCA\User_LDAP\LDAP; +use OCA\User_LDAP\Group_Proxy; use OCA\User_LDAP\Mapping\GroupMapping; -use OCA\User_LDAP\User_Proxy; -use OCA\User_LDAP\UserPluginManager; -use OCP\IConfig; class UUIDFixGroup extends UUIDFix { - public function __construct(GroupMapping $mapper, LDAP $ldap, IConfig $config, Helper $helper) { + public function __construct(GroupMapping $mapper, Group_Proxy $proxy) { $this->mapper = $mapper; - $this->proxy = new User_Proxy($helper->getServerConfigurationPrefixes(true), $ldap, $config, - \OC::$server->getNotificationManager(), \OC::$server->getUserSession(), - \OC::$server->query(UserPluginManager::class)); + $this->proxy = $proxy; } } diff --git a/apps/user_ldap/lib/Migration/UUIDFixUser.php b/apps/user_ldap/lib/Migration/UUIDFixUser.php index f2be0c5ed96..4ea58c45620 100644 --- a/apps/user_ldap/lib/Migration/UUIDFixUser.php +++ b/apps/user_ldap/lib/Migration/UUIDFixUser.php @@ -26,17 +26,12 @@ 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\User_Proxy; use OCA\User_LDAP\Mapping\UserMapping; -use OCP\IConfig; class UUIDFixUser extends UUIDFix { - public function __construct(UserMapping $mapper, LDAP $ldap, IConfig $config, Helper $helper) { + public function __construct(UserMapping $mapper, User_Proxy $proxy) { $this->mapper = $mapper; - $groupPluginManager = \OC::$server->query(GroupPluginManager::class); - $this->proxy = new Group_Proxy($helper->getServerConfigurationPrefixes(true), $ldap, $groupPluginManager); + $this->proxy = $proxy; } } |