@@ -6,96 +6,96 @@ |
||
| 6 | 6 | |
| 7 | 7 | class ComposerStaticInitUser_LDAP |
| 8 | 8 | { |
| 9 | - public static $prefixLengthsPsr4 = array ( |
|
| 9 | + public static $prefixLengthsPsr4 = array( |
|
| 10 | 10 | 'O' => |
| 11 | - array ( |
|
| 11 | + array( |
|
| 12 | 12 | 'OCA\\User_LDAP\\' => 14, |
| 13 | 13 | ), |
| 14 | 14 | ); |
| 15 | 15 | |
| 16 | - public static $prefixDirsPsr4 = array ( |
|
| 16 | + public static $prefixDirsPsr4 = array( |
|
| 17 | 17 | 'OCA\\User_LDAP\\' => |
| 18 | - array ( |
|
| 19 | - 0 => __DIR__ . '/..' . '/../lib', |
|
| 18 | + array( |
|
| 19 | + 0 => __DIR__.'/..'.'/../lib', |
|
| 20 | 20 | ), |
| 21 | 21 | ); |
| 22 | 22 | |
| 23 | - public static $classMap = array ( |
|
| 24 | - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
|
| 25 | - 'OCA\\User_LDAP\\Access' => __DIR__ . '/..' . '/../lib/Access.php', |
|
| 26 | - 'OCA\\User_LDAP\\AccessFactory' => __DIR__ . '/..' . '/../lib/AccessFactory.php', |
|
| 27 | - 'OCA\\User_LDAP\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
| 28 | - 'OCA\\User_LDAP\\BackendUtility' => __DIR__ . '/..' . '/../lib/BackendUtility.php', |
|
| 29 | - 'OCA\\User_LDAP\\Command\\CheckUser' => __DIR__ . '/..' . '/../lib/Command/CheckUser.php', |
|
| 30 | - 'OCA\\User_LDAP\\Command\\CreateEmptyConfig' => __DIR__ . '/..' . '/../lib/Command/CreateEmptyConfig.php', |
|
| 31 | - 'OCA\\User_LDAP\\Command\\DeleteConfig' => __DIR__ . '/..' . '/../lib/Command/DeleteConfig.php', |
|
| 32 | - 'OCA\\User_LDAP\\Command\\ResetUser' => __DIR__ . '/..' . '/../lib/Command/ResetUser.php', |
|
| 33 | - 'OCA\\User_LDAP\\Command\\Search' => __DIR__ . '/..' . '/../lib/Command/Search.php', |
|
| 34 | - 'OCA\\User_LDAP\\Command\\SetConfig' => __DIR__ . '/..' . '/../lib/Command/SetConfig.php', |
|
| 35 | - 'OCA\\User_LDAP\\Command\\ShowConfig' => __DIR__ . '/..' . '/../lib/Command/ShowConfig.php', |
|
| 36 | - 'OCA\\User_LDAP\\Command\\ShowRemnants' => __DIR__ . '/..' . '/../lib/Command/ShowRemnants.php', |
|
| 37 | - 'OCA\\User_LDAP\\Command\\TestConfig' => __DIR__ . '/..' . '/../lib/Command/TestConfig.php', |
|
| 38 | - 'OCA\\User_LDAP\\Configuration' => __DIR__ . '/..' . '/../lib/Configuration.php', |
|
| 39 | - 'OCA\\User_LDAP\\Connection' => __DIR__ . '/..' . '/../lib/Connection.php', |
|
| 40 | - 'OCA\\User_LDAP\\ConnectionFactory' => __DIR__ . '/..' . '/../lib/ConnectionFactory.php', |
|
| 41 | - 'OCA\\User_LDAP\\Controller\\ConfigAPIController' => __DIR__ . '/..' . '/../lib/Controller/ConfigAPIController.php', |
|
| 42 | - 'OCA\\User_LDAP\\Controller\\RenewPasswordController' => __DIR__ . '/..' . '/../lib/Controller/RenewPasswordController.php', |
|
| 43 | - 'OCA\\User_LDAP\\Events\\GroupBackendRegistered' => __DIR__ . '/..' . '/../lib/Events/GroupBackendRegistered.php', |
|
| 44 | - 'OCA\\User_LDAP\\Events\\UserBackendRegistered' => __DIR__ . '/..' . '/../lib/Events/UserBackendRegistered.php', |
|
| 45 | - 'OCA\\User_LDAP\\Exceptions\\AttributeNotSet' => __DIR__ . '/..' . '/../lib/Exceptions/AttributeNotSet.php', |
|
| 46 | - 'OCA\\User_LDAP\\Exceptions\\ConstraintViolationException' => __DIR__ . '/..' . '/../lib/Exceptions/ConstraintViolationException.php', |
|
| 47 | - 'OCA\\User_LDAP\\Exceptions\\NotOnLDAP' => __DIR__ . '/..' . '/../lib/Exceptions/NotOnLDAP.php', |
|
| 48 | - 'OCA\\User_LDAP\\FilesystemHelper' => __DIR__ . '/..' . '/../lib/FilesystemHelper.php', |
|
| 49 | - 'OCA\\User_LDAP\\GroupPluginManager' => __DIR__ . '/..' . '/../lib/GroupPluginManager.php', |
|
| 50 | - 'OCA\\User_LDAP\\Group_LDAP' => __DIR__ . '/..' . '/../lib/Group_LDAP.php', |
|
| 51 | - 'OCA\\User_LDAP\\Group_Proxy' => __DIR__ . '/..' . '/../lib/Group_Proxy.php', |
|
| 52 | - 'OCA\\User_LDAP\\Handler\\ExtStorageConfigHandler' => __DIR__ . '/..' . '/../lib/Handler/ExtStorageConfigHandler.php', |
|
| 53 | - 'OCA\\User_LDAP\\Helper' => __DIR__ . '/..' . '/../lib/Helper.php', |
|
| 54 | - 'OCA\\User_LDAP\\IGroupLDAP' => __DIR__ . '/..' . '/../lib/IGroupLDAP.php', |
|
| 55 | - 'OCA\\User_LDAP\\ILDAPGroupPlugin' => __DIR__ . '/..' . '/../lib/ILDAPGroupPlugin.php', |
|
| 56 | - 'OCA\\User_LDAP\\ILDAPUserPlugin' => __DIR__ . '/..' . '/../lib/ILDAPUserPlugin.php', |
|
| 57 | - 'OCA\\User_LDAP\\ILDAPWrapper' => __DIR__ . '/..' . '/../lib/ILDAPWrapper.php', |
|
| 58 | - 'OCA\\User_LDAP\\IUserLDAP' => __DIR__ . '/..' . '/../lib/IUserLDAP.php', |
|
| 59 | - 'OCA\\User_LDAP\\Jobs\\CleanUp' => __DIR__ . '/..' . '/../lib/Jobs/CleanUp.php', |
|
| 60 | - 'OCA\\User_LDAP\\Jobs\\Sync' => __DIR__ . '/..' . '/../lib/Jobs/Sync.php', |
|
| 61 | - 'OCA\\User_LDAP\\Jobs\\UpdateGroups' => __DIR__ . '/..' . '/../lib/Jobs/UpdateGroups.php', |
|
| 62 | - 'OCA\\User_LDAP\\LDAP' => __DIR__ . '/..' . '/../lib/LDAP.php', |
|
| 63 | - 'OCA\\User_LDAP\\LDAPProvider' => __DIR__ . '/..' . '/../lib/LDAPProvider.php', |
|
| 64 | - 'OCA\\User_LDAP\\LDAPProviderFactory' => __DIR__ . '/..' . '/../lib/LDAPProviderFactory.php', |
|
| 65 | - 'OCA\\User_LDAP\\LDAPUtility' => __DIR__ . '/..' . '/../lib/LDAPUtility.php', |
|
| 66 | - 'OCA\\User_LDAP\\LogWrapper' => __DIR__ . '/..' . '/../lib/LogWrapper.php', |
|
| 67 | - 'OCA\\User_LDAP\\Mapping\\AbstractMapping' => __DIR__ . '/..' . '/../lib/Mapping/AbstractMapping.php', |
|
| 68 | - 'OCA\\User_LDAP\\Mapping\\GroupMapping' => __DIR__ . '/..' . '/../lib/Mapping/GroupMapping.php', |
|
| 69 | - 'OCA\\User_LDAP\\Mapping\\UserMapping' => __DIR__ . '/..' . '/../lib/Mapping/UserMapping.php', |
|
| 70 | - 'OCA\\User_LDAP\\Migration\\RemoveRefreshTime' => __DIR__ . '/..' . '/../lib/Migration/RemoveRefreshTime.php', |
|
| 71 | - 'OCA\\User_LDAP\\Migration\\SetDefaultProvider' => __DIR__ . '/..' . '/../lib/Migration/SetDefaultProvider.php', |
|
| 72 | - 'OCA\\User_LDAP\\Migration\\UUIDFix' => __DIR__ . '/..' . '/../lib/Migration/UUIDFix.php', |
|
| 73 | - 'OCA\\User_LDAP\\Migration\\UUIDFixGroup' => __DIR__ . '/..' . '/../lib/Migration/UUIDFixGroup.php', |
|
| 74 | - 'OCA\\User_LDAP\\Migration\\UUIDFixInsert' => __DIR__ . '/..' . '/../lib/Migration/UUIDFixInsert.php', |
|
| 75 | - 'OCA\\User_LDAP\\Migration\\UUIDFixUser' => __DIR__ . '/..' . '/../lib/Migration/UUIDFixUser.php', |
|
| 76 | - 'OCA\\User_LDAP\\Migration\\Version1010Date20200630192842' => __DIR__ . '/..' . '/../lib/Migration/Version1010Date20200630192842.php', |
|
| 77 | - 'OCA\\User_LDAP\\Notification\\Notifier' => __DIR__ . '/..' . '/../lib/Notification/Notifier.php', |
|
| 78 | - 'OCA\\User_LDAP\\PagedResults\\IAdapter' => __DIR__ . '/..' . '/../lib/PagedResults/IAdapter.php', |
|
| 79 | - 'OCA\\User_LDAP\\PagedResults\\Php54' => __DIR__ . '/..' . '/../lib/PagedResults/Php54.php', |
|
| 80 | - 'OCA\\User_LDAP\\PagedResults\\Php73' => __DIR__ . '/..' . '/../lib/PagedResults/Php73.php', |
|
| 81 | - 'OCA\\User_LDAP\\PagedResults\\TLinkId' => __DIR__ . '/..' . '/../lib/PagedResults/TLinkId.php', |
|
| 82 | - 'OCA\\User_LDAP\\Proxy' => __DIR__ . '/..' . '/../lib/Proxy.php', |
|
| 83 | - 'OCA\\User_LDAP\\Settings\\Admin' => __DIR__ . '/..' . '/../lib/Settings/Admin.php', |
|
| 84 | - 'OCA\\User_LDAP\\Settings\\Section' => __DIR__ . '/..' . '/../lib/Settings/Section.php', |
|
| 85 | - 'OCA\\User_LDAP\\UserPluginManager' => __DIR__ . '/..' . '/../lib/UserPluginManager.php', |
|
| 86 | - 'OCA\\User_LDAP\\User\\DeletedUsersIndex' => __DIR__ . '/..' . '/../lib/User/DeletedUsersIndex.php', |
|
| 87 | - 'OCA\\User_LDAP\\User\\Manager' => __DIR__ . '/..' . '/../lib/User/Manager.php', |
|
| 88 | - 'OCA\\User_LDAP\\User\\OfflineUser' => __DIR__ . '/..' . '/../lib/User/OfflineUser.php', |
|
| 89 | - 'OCA\\User_LDAP\\User\\User' => __DIR__ . '/..' . '/../lib/User/User.php', |
|
| 90 | - 'OCA\\User_LDAP\\User_LDAP' => __DIR__ . '/..' . '/../lib/User_LDAP.php', |
|
| 91 | - 'OCA\\User_LDAP\\User_Proxy' => __DIR__ . '/..' . '/../lib/User_Proxy.php', |
|
| 92 | - 'OCA\\User_LDAP\\Wizard' => __DIR__ . '/..' . '/../lib/Wizard.php', |
|
| 93 | - 'OCA\\User_LDAP\\WizardResult' => __DIR__ . '/..' . '/../lib/WizardResult.php', |
|
| 23 | + public static $classMap = array( |
|
| 24 | + 'Composer\\InstalledVersions' => __DIR__.'/..'.'/composer/InstalledVersions.php', |
|
| 25 | + 'OCA\\User_LDAP\\Access' => __DIR__.'/..'.'/../lib/Access.php', |
|
| 26 | + 'OCA\\User_LDAP\\AccessFactory' => __DIR__.'/..'.'/../lib/AccessFactory.php', |
|
| 27 | + 'OCA\\User_LDAP\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
| 28 | + 'OCA\\User_LDAP\\BackendUtility' => __DIR__.'/..'.'/../lib/BackendUtility.php', |
|
| 29 | + 'OCA\\User_LDAP\\Command\\CheckUser' => __DIR__.'/..'.'/../lib/Command/CheckUser.php', |
|
| 30 | + 'OCA\\User_LDAP\\Command\\CreateEmptyConfig' => __DIR__.'/..'.'/../lib/Command/CreateEmptyConfig.php', |
|
| 31 | + 'OCA\\User_LDAP\\Command\\DeleteConfig' => __DIR__.'/..'.'/../lib/Command/DeleteConfig.php', |
|
| 32 | + 'OCA\\User_LDAP\\Command\\ResetUser' => __DIR__.'/..'.'/../lib/Command/ResetUser.php', |
|
| 33 | + 'OCA\\User_LDAP\\Command\\Search' => __DIR__.'/..'.'/../lib/Command/Search.php', |
|
| 34 | + 'OCA\\User_LDAP\\Command\\SetConfig' => __DIR__.'/..'.'/../lib/Command/SetConfig.php', |
|
| 35 | + 'OCA\\User_LDAP\\Command\\ShowConfig' => __DIR__.'/..'.'/../lib/Command/ShowConfig.php', |
|
| 36 | + 'OCA\\User_LDAP\\Command\\ShowRemnants' => __DIR__.'/..'.'/../lib/Command/ShowRemnants.php', |
|
| 37 | + 'OCA\\User_LDAP\\Command\\TestConfig' => __DIR__.'/..'.'/../lib/Command/TestConfig.php', |
|
| 38 | + 'OCA\\User_LDAP\\Configuration' => __DIR__.'/..'.'/../lib/Configuration.php', |
|
| 39 | + 'OCA\\User_LDAP\\Connection' => __DIR__.'/..'.'/../lib/Connection.php', |
|
| 40 | + 'OCA\\User_LDAP\\ConnectionFactory' => __DIR__.'/..'.'/../lib/ConnectionFactory.php', |
|
| 41 | + 'OCA\\User_LDAP\\Controller\\ConfigAPIController' => __DIR__.'/..'.'/../lib/Controller/ConfigAPIController.php', |
|
| 42 | + 'OCA\\User_LDAP\\Controller\\RenewPasswordController' => __DIR__.'/..'.'/../lib/Controller/RenewPasswordController.php', |
|
| 43 | + 'OCA\\User_LDAP\\Events\\GroupBackendRegistered' => __DIR__.'/..'.'/../lib/Events/GroupBackendRegistered.php', |
|
| 44 | + 'OCA\\User_LDAP\\Events\\UserBackendRegistered' => __DIR__.'/..'.'/../lib/Events/UserBackendRegistered.php', |
|
| 45 | + 'OCA\\User_LDAP\\Exceptions\\AttributeNotSet' => __DIR__.'/..'.'/../lib/Exceptions/AttributeNotSet.php', |
|
| 46 | + 'OCA\\User_LDAP\\Exceptions\\ConstraintViolationException' => __DIR__.'/..'.'/../lib/Exceptions/ConstraintViolationException.php', |
|
| 47 | + 'OCA\\User_LDAP\\Exceptions\\NotOnLDAP' => __DIR__.'/..'.'/../lib/Exceptions/NotOnLDAP.php', |
|
| 48 | + 'OCA\\User_LDAP\\FilesystemHelper' => __DIR__.'/..'.'/../lib/FilesystemHelper.php', |
|
| 49 | + 'OCA\\User_LDAP\\GroupPluginManager' => __DIR__.'/..'.'/../lib/GroupPluginManager.php', |
|
| 50 | + 'OCA\\User_LDAP\\Group_LDAP' => __DIR__.'/..'.'/../lib/Group_LDAP.php', |
|
| 51 | + 'OCA\\User_LDAP\\Group_Proxy' => __DIR__.'/..'.'/../lib/Group_Proxy.php', |
|
| 52 | + 'OCA\\User_LDAP\\Handler\\ExtStorageConfigHandler' => __DIR__.'/..'.'/../lib/Handler/ExtStorageConfigHandler.php', |
|
| 53 | + 'OCA\\User_LDAP\\Helper' => __DIR__.'/..'.'/../lib/Helper.php', |
|
| 54 | + 'OCA\\User_LDAP\\IGroupLDAP' => __DIR__.'/..'.'/../lib/IGroupLDAP.php', |
|
| 55 | + 'OCA\\User_LDAP\\ILDAPGroupPlugin' => __DIR__.'/..'.'/../lib/ILDAPGroupPlugin.php', |
|
| 56 | + 'OCA\\User_LDAP\\ILDAPUserPlugin' => __DIR__.'/..'.'/../lib/ILDAPUserPlugin.php', |
|
| 57 | + 'OCA\\User_LDAP\\ILDAPWrapper' => __DIR__.'/..'.'/../lib/ILDAPWrapper.php', |
|
| 58 | + 'OCA\\User_LDAP\\IUserLDAP' => __DIR__.'/..'.'/../lib/IUserLDAP.php', |
|
| 59 | + 'OCA\\User_LDAP\\Jobs\\CleanUp' => __DIR__.'/..'.'/../lib/Jobs/CleanUp.php', |
|
| 60 | + 'OCA\\User_LDAP\\Jobs\\Sync' => __DIR__.'/..'.'/../lib/Jobs/Sync.php', |
|
| 61 | + 'OCA\\User_LDAP\\Jobs\\UpdateGroups' => __DIR__.'/..'.'/../lib/Jobs/UpdateGroups.php', |
|
| 62 | + 'OCA\\User_LDAP\\LDAP' => __DIR__.'/..'.'/../lib/LDAP.php', |
|
| 63 | + 'OCA\\User_LDAP\\LDAPProvider' => __DIR__.'/..'.'/../lib/LDAPProvider.php', |
|
| 64 | + 'OCA\\User_LDAP\\LDAPProviderFactory' => __DIR__.'/..'.'/../lib/LDAPProviderFactory.php', |
|
| 65 | + 'OCA\\User_LDAP\\LDAPUtility' => __DIR__.'/..'.'/../lib/LDAPUtility.php', |
|
| 66 | + 'OCA\\User_LDAP\\LogWrapper' => __DIR__.'/..'.'/../lib/LogWrapper.php', |
|
| 67 | + 'OCA\\User_LDAP\\Mapping\\AbstractMapping' => __DIR__.'/..'.'/../lib/Mapping/AbstractMapping.php', |
|
| 68 | + 'OCA\\User_LDAP\\Mapping\\GroupMapping' => __DIR__.'/..'.'/../lib/Mapping/GroupMapping.php', |
|
| 69 | + 'OCA\\User_LDAP\\Mapping\\UserMapping' => __DIR__.'/..'.'/../lib/Mapping/UserMapping.php', |
|
| 70 | + 'OCA\\User_LDAP\\Migration\\RemoveRefreshTime' => __DIR__.'/..'.'/../lib/Migration/RemoveRefreshTime.php', |
|
| 71 | + 'OCA\\User_LDAP\\Migration\\SetDefaultProvider' => __DIR__.'/..'.'/../lib/Migration/SetDefaultProvider.php', |
|
| 72 | + 'OCA\\User_LDAP\\Migration\\UUIDFix' => __DIR__.'/..'.'/../lib/Migration/UUIDFix.php', |
|
| 73 | + 'OCA\\User_LDAP\\Migration\\UUIDFixGroup' => __DIR__.'/..'.'/../lib/Migration/UUIDFixGroup.php', |
|
| 74 | + 'OCA\\User_LDAP\\Migration\\UUIDFixInsert' => __DIR__.'/..'.'/../lib/Migration/UUIDFixInsert.php', |
|
| 75 | + 'OCA\\User_LDAP\\Migration\\UUIDFixUser' => __DIR__.'/..'.'/../lib/Migration/UUIDFixUser.php', |
|
| 76 | + 'OCA\\User_LDAP\\Migration\\Version1010Date20200630192842' => __DIR__.'/..'.'/../lib/Migration/Version1010Date20200630192842.php', |
|
| 77 | + 'OCA\\User_LDAP\\Notification\\Notifier' => __DIR__.'/..'.'/../lib/Notification/Notifier.php', |
|
| 78 | + 'OCA\\User_LDAP\\PagedResults\\IAdapter' => __DIR__.'/..'.'/../lib/PagedResults/IAdapter.php', |
|
| 79 | + 'OCA\\User_LDAP\\PagedResults\\Php54' => __DIR__.'/..'.'/../lib/PagedResults/Php54.php', |
|
| 80 | + 'OCA\\User_LDAP\\PagedResults\\Php73' => __DIR__.'/..'.'/../lib/PagedResults/Php73.php', |
|
| 81 | + 'OCA\\User_LDAP\\PagedResults\\TLinkId' => __DIR__.'/..'.'/../lib/PagedResults/TLinkId.php', |
|
| 82 | + 'OCA\\User_LDAP\\Proxy' => __DIR__.'/..'.'/../lib/Proxy.php', |
|
| 83 | + 'OCA\\User_LDAP\\Settings\\Admin' => __DIR__.'/..'.'/../lib/Settings/Admin.php', |
|
| 84 | + 'OCA\\User_LDAP\\Settings\\Section' => __DIR__.'/..'.'/../lib/Settings/Section.php', |
|
| 85 | + 'OCA\\User_LDAP\\UserPluginManager' => __DIR__.'/..'.'/../lib/UserPluginManager.php', |
|
| 86 | + 'OCA\\User_LDAP\\User\\DeletedUsersIndex' => __DIR__.'/..'.'/../lib/User/DeletedUsersIndex.php', |
|
| 87 | + 'OCA\\User_LDAP\\User\\Manager' => __DIR__.'/..'.'/../lib/User/Manager.php', |
|
| 88 | + 'OCA\\User_LDAP\\User\\OfflineUser' => __DIR__.'/..'.'/../lib/User/OfflineUser.php', |
|
| 89 | + 'OCA\\User_LDAP\\User\\User' => __DIR__.'/..'.'/../lib/User/User.php', |
|
| 90 | + 'OCA\\User_LDAP\\User_LDAP' => __DIR__.'/..'.'/../lib/User_LDAP.php', |
|
| 91 | + 'OCA\\User_LDAP\\User_Proxy' => __DIR__.'/..'.'/../lib/User_Proxy.php', |
|
| 92 | + 'OCA\\User_LDAP\\Wizard' => __DIR__.'/..'.'/../lib/Wizard.php', |
|
| 93 | + 'OCA\\User_LDAP\\WizardResult' => __DIR__.'/..'.'/../lib/WizardResult.php', |
|
| 94 | 94 | ); |
| 95 | 95 | |
| 96 | 96 | public static function getInitializer(ClassLoader $loader) |
| 97 | 97 | { |
| 98 | - return \Closure::bind(function () use ($loader) { |
|
| 98 | + return \Closure::bind(function() use ($loader) { |
|
| 99 | 99 | $loader->prefixLengthsPsr4 = ComposerStaticInitUser_LDAP::$prefixLengthsPsr4; |
| 100 | 100 | $loader->prefixDirsPsr4 = ComposerStaticInitUser_LDAP::$prefixDirsPsr4; |
| 101 | 101 | $loader->classMap = ComposerStaticInitUser_LDAP::$classMap; |
@@ -6,74 +6,74 @@ |
||
| 6 | 6 | $baseDir = $vendorDir; |
| 7 | 7 | |
| 8 | 8 | return array( |
| 9 | - 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', |
|
| 10 | - 'OCA\\User_LDAP\\Access' => $baseDir . '/../lib/Access.php', |
|
| 11 | - 'OCA\\User_LDAP\\AccessFactory' => $baseDir . '/../lib/AccessFactory.php', |
|
| 12 | - 'OCA\\User_LDAP\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
| 13 | - 'OCA\\User_LDAP\\BackendUtility' => $baseDir . '/../lib/BackendUtility.php', |
|
| 14 | - 'OCA\\User_LDAP\\Command\\CheckUser' => $baseDir . '/../lib/Command/CheckUser.php', |
|
| 15 | - 'OCA\\User_LDAP\\Command\\CreateEmptyConfig' => $baseDir . '/../lib/Command/CreateEmptyConfig.php', |
|
| 16 | - 'OCA\\User_LDAP\\Command\\DeleteConfig' => $baseDir . '/../lib/Command/DeleteConfig.php', |
|
| 17 | - 'OCA\\User_LDAP\\Command\\ResetUser' => $baseDir . '/../lib/Command/ResetUser.php', |
|
| 18 | - 'OCA\\User_LDAP\\Command\\Search' => $baseDir . '/../lib/Command/Search.php', |
|
| 19 | - 'OCA\\User_LDAP\\Command\\SetConfig' => $baseDir . '/../lib/Command/SetConfig.php', |
|
| 20 | - 'OCA\\User_LDAP\\Command\\ShowConfig' => $baseDir . '/../lib/Command/ShowConfig.php', |
|
| 21 | - 'OCA\\User_LDAP\\Command\\ShowRemnants' => $baseDir . '/../lib/Command/ShowRemnants.php', |
|
| 22 | - 'OCA\\User_LDAP\\Command\\TestConfig' => $baseDir . '/../lib/Command/TestConfig.php', |
|
| 23 | - 'OCA\\User_LDAP\\Configuration' => $baseDir . '/../lib/Configuration.php', |
|
| 24 | - 'OCA\\User_LDAP\\Connection' => $baseDir . '/../lib/Connection.php', |
|
| 25 | - 'OCA\\User_LDAP\\ConnectionFactory' => $baseDir . '/../lib/ConnectionFactory.php', |
|
| 26 | - 'OCA\\User_LDAP\\Controller\\ConfigAPIController' => $baseDir . '/../lib/Controller/ConfigAPIController.php', |
|
| 27 | - 'OCA\\User_LDAP\\Controller\\RenewPasswordController' => $baseDir . '/../lib/Controller/RenewPasswordController.php', |
|
| 28 | - 'OCA\\User_LDAP\\Events\\GroupBackendRegistered' => $baseDir . '/../lib/Events/GroupBackendRegistered.php', |
|
| 29 | - 'OCA\\User_LDAP\\Events\\UserBackendRegistered' => $baseDir . '/../lib/Events/UserBackendRegistered.php', |
|
| 30 | - 'OCA\\User_LDAP\\Exceptions\\AttributeNotSet' => $baseDir . '/../lib/Exceptions/AttributeNotSet.php', |
|
| 31 | - 'OCA\\User_LDAP\\Exceptions\\ConstraintViolationException' => $baseDir . '/../lib/Exceptions/ConstraintViolationException.php', |
|
| 32 | - 'OCA\\User_LDAP\\Exceptions\\NotOnLDAP' => $baseDir . '/../lib/Exceptions/NotOnLDAP.php', |
|
| 33 | - 'OCA\\User_LDAP\\FilesystemHelper' => $baseDir . '/../lib/FilesystemHelper.php', |
|
| 34 | - 'OCA\\User_LDAP\\GroupPluginManager' => $baseDir . '/../lib/GroupPluginManager.php', |
|
| 35 | - 'OCA\\User_LDAP\\Group_LDAP' => $baseDir . '/../lib/Group_LDAP.php', |
|
| 36 | - 'OCA\\User_LDAP\\Group_Proxy' => $baseDir . '/../lib/Group_Proxy.php', |
|
| 37 | - 'OCA\\User_LDAP\\Handler\\ExtStorageConfigHandler' => $baseDir . '/../lib/Handler/ExtStorageConfigHandler.php', |
|
| 38 | - 'OCA\\User_LDAP\\Helper' => $baseDir . '/../lib/Helper.php', |
|
| 39 | - 'OCA\\User_LDAP\\IGroupLDAP' => $baseDir . '/../lib/IGroupLDAP.php', |
|
| 40 | - 'OCA\\User_LDAP\\ILDAPGroupPlugin' => $baseDir . '/../lib/ILDAPGroupPlugin.php', |
|
| 41 | - 'OCA\\User_LDAP\\ILDAPUserPlugin' => $baseDir . '/../lib/ILDAPUserPlugin.php', |
|
| 42 | - 'OCA\\User_LDAP\\ILDAPWrapper' => $baseDir . '/../lib/ILDAPWrapper.php', |
|
| 43 | - 'OCA\\User_LDAP\\IUserLDAP' => $baseDir . '/../lib/IUserLDAP.php', |
|
| 44 | - 'OCA\\User_LDAP\\Jobs\\CleanUp' => $baseDir . '/../lib/Jobs/CleanUp.php', |
|
| 45 | - 'OCA\\User_LDAP\\Jobs\\Sync' => $baseDir . '/../lib/Jobs/Sync.php', |
|
| 46 | - 'OCA\\User_LDAP\\Jobs\\UpdateGroups' => $baseDir . '/../lib/Jobs/UpdateGroups.php', |
|
| 47 | - 'OCA\\User_LDAP\\LDAP' => $baseDir . '/../lib/LDAP.php', |
|
| 48 | - 'OCA\\User_LDAP\\LDAPProvider' => $baseDir . '/../lib/LDAPProvider.php', |
|
| 49 | - 'OCA\\User_LDAP\\LDAPProviderFactory' => $baseDir . '/../lib/LDAPProviderFactory.php', |
|
| 50 | - 'OCA\\User_LDAP\\LDAPUtility' => $baseDir . '/../lib/LDAPUtility.php', |
|
| 51 | - 'OCA\\User_LDAP\\LogWrapper' => $baseDir . '/../lib/LogWrapper.php', |
|
| 52 | - 'OCA\\User_LDAP\\Mapping\\AbstractMapping' => $baseDir . '/../lib/Mapping/AbstractMapping.php', |
|
| 53 | - 'OCA\\User_LDAP\\Mapping\\GroupMapping' => $baseDir . '/../lib/Mapping/GroupMapping.php', |
|
| 54 | - 'OCA\\User_LDAP\\Mapping\\UserMapping' => $baseDir . '/../lib/Mapping/UserMapping.php', |
|
| 55 | - 'OCA\\User_LDAP\\Migration\\RemoveRefreshTime' => $baseDir . '/../lib/Migration/RemoveRefreshTime.php', |
|
| 56 | - 'OCA\\User_LDAP\\Migration\\SetDefaultProvider' => $baseDir . '/../lib/Migration/SetDefaultProvider.php', |
|
| 57 | - 'OCA\\User_LDAP\\Migration\\UUIDFix' => $baseDir . '/../lib/Migration/UUIDFix.php', |
|
| 58 | - 'OCA\\User_LDAP\\Migration\\UUIDFixGroup' => $baseDir . '/../lib/Migration/UUIDFixGroup.php', |
|
| 59 | - 'OCA\\User_LDAP\\Migration\\UUIDFixInsert' => $baseDir . '/../lib/Migration/UUIDFixInsert.php', |
|
| 60 | - 'OCA\\User_LDAP\\Migration\\UUIDFixUser' => $baseDir . '/../lib/Migration/UUIDFixUser.php', |
|
| 61 | - 'OCA\\User_LDAP\\Migration\\Version1010Date20200630192842' => $baseDir . '/../lib/Migration/Version1010Date20200630192842.php', |
|
| 62 | - 'OCA\\User_LDAP\\Notification\\Notifier' => $baseDir . '/../lib/Notification/Notifier.php', |
|
| 63 | - 'OCA\\User_LDAP\\PagedResults\\IAdapter' => $baseDir . '/../lib/PagedResults/IAdapter.php', |
|
| 64 | - 'OCA\\User_LDAP\\PagedResults\\Php54' => $baseDir . '/../lib/PagedResults/Php54.php', |
|
| 65 | - 'OCA\\User_LDAP\\PagedResults\\Php73' => $baseDir . '/../lib/PagedResults/Php73.php', |
|
| 66 | - 'OCA\\User_LDAP\\PagedResults\\TLinkId' => $baseDir . '/../lib/PagedResults/TLinkId.php', |
|
| 67 | - 'OCA\\User_LDAP\\Proxy' => $baseDir . '/../lib/Proxy.php', |
|
| 68 | - 'OCA\\User_LDAP\\Settings\\Admin' => $baseDir . '/../lib/Settings/Admin.php', |
|
| 69 | - 'OCA\\User_LDAP\\Settings\\Section' => $baseDir . '/../lib/Settings/Section.php', |
|
| 70 | - 'OCA\\User_LDAP\\UserPluginManager' => $baseDir . '/../lib/UserPluginManager.php', |
|
| 71 | - 'OCA\\User_LDAP\\User\\DeletedUsersIndex' => $baseDir . '/../lib/User/DeletedUsersIndex.php', |
|
| 72 | - 'OCA\\User_LDAP\\User\\Manager' => $baseDir . '/../lib/User/Manager.php', |
|
| 73 | - 'OCA\\User_LDAP\\User\\OfflineUser' => $baseDir . '/../lib/User/OfflineUser.php', |
|
| 74 | - 'OCA\\User_LDAP\\User\\User' => $baseDir . '/../lib/User/User.php', |
|
| 75 | - 'OCA\\User_LDAP\\User_LDAP' => $baseDir . '/../lib/User_LDAP.php', |
|
| 76 | - 'OCA\\User_LDAP\\User_Proxy' => $baseDir . '/../lib/User_Proxy.php', |
|
| 77 | - 'OCA\\User_LDAP\\Wizard' => $baseDir . '/../lib/Wizard.php', |
|
| 78 | - 'OCA\\User_LDAP\\WizardResult' => $baseDir . '/../lib/WizardResult.php', |
|
| 9 | + 'Composer\\InstalledVersions' => $vendorDir.'/composer/InstalledVersions.php', |
|
| 10 | + 'OCA\\User_LDAP\\Access' => $baseDir.'/../lib/Access.php', |
|
| 11 | + 'OCA\\User_LDAP\\AccessFactory' => $baseDir.'/../lib/AccessFactory.php', |
|
| 12 | + 'OCA\\User_LDAP\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
| 13 | + 'OCA\\User_LDAP\\BackendUtility' => $baseDir.'/../lib/BackendUtility.php', |
|
| 14 | + 'OCA\\User_LDAP\\Command\\CheckUser' => $baseDir.'/../lib/Command/CheckUser.php', |
|
| 15 | + 'OCA\\User_LDAP\\Command\\CreateEmptyConfig' => $baseDir.'/../lib/Command/CreateEmptyConfig.php', |
|
| 16 | + 'OCA\\User_LDAP\\Command\\DeleteConfig' => $baseDir.'/../lib/Command/DeleteConfig.php', |
|
| 17 | + 'OCA\\User_LDAP\\Command\\ResetUser' => $baseDir.'/../lib/Command/ResetUser.php', |
|
| 18 | + 'OCA\\User_LDAP\\Command\\Search' => $baseDir.'/../lib/Command/Search.php', |
|
| 19 | + 'OCA\\User_LDAP\\Command\\SetConfig' => $baseDir.'/../lib/Command/SetConfig.php', |
|
| 20 | + 'OCA\\User_LDAP\\Command\\ShowConfig' => $baseDir.'/../lib/Command/ShowConfig.php', |
|
| 21 | + 'OCA\\User_LDAP\\Command\\ShowRemnants' => $baseDir.'/../lib/Command/ShowRemnants.php', |
|
| 22 | + 'OCA\\User_LDAP\\Command\\TestConfig' => $baseDir.'/../lib/Command/TestConfig.php', |
|
| 23 | + 'OCA\\User_LDAP\\Configuration' => $baseDir.'/../lib/Configuration.php', |
|
| 24 | + 'OCA\\User_LDAP\\Connection' => $baseDir.'/../lib/Connection.php', |
|
| 25 | + 'OCA\\User_LDAP\\ConnectionFactory' => $baseDir.'/../lib/ConnectionFactory.php', |
|
| 26 | + 'OCA\\User_LDAP\\Controller\\ConfigAPIController' => $baseDir.'/../lib/Controller/ConfigAPIController.php', |
|
| 27 | + 'OCA\\User_LDAP\\Controller\\RenewPasswordController' => $baseDir.'/../lib/Controller/RenewPasswordController.php', |
|
| 28 | + 'OCA\\User_LDAP\\Events\\GroupBackendRegistered' => $baseDir.'/../lib/Events/GroupBackendRegistered.php', |
|
| 29 | + 'OCA\\User_LDAP\\Events\\UserBackendRegistered' => $baseDir.'/../lib/Events/UserBackendRegistered.php', |
|
| 30 | + 'OCA\\User_LDAP\\Exceptions\\AttributeNotSet' => $baseDir.'/../lib/Exceptions/AttributeNotSet.php', |
|
| 31 | + 'OCA\\User_LDAP\\Exceptions\\ConstraintViolationException' => $baseDir.'/../lib/Exceptions/ConstraintViolationException.php', |
|
| 32 | + 'OCA\\User_LDAP\\Exceptions\\NotOnLDAP' => $baseDir.'/../lib/Exceptions/NotOnLDAP.php', |
|
| 33 | + 'OCA\\User_LDAP\\FilesystemHelper' => $baseDir.'/../lib/FilesystemHelper.php', |
|
| 34 | + 'OCA\\User_LDAP\\GroupPluginManager' => $baseDir.'/../lib/GroupPluginManager.php', |
|
| 35 | + 'OCA\\User_LDAP\\Group_LDAP' => $baseDir.'/../lib/Group_LDAP.php', |
|
| 36 | + 'OCA\\User_LDAP\\Group_Proxy' => $baseDir.'/../lib/Group_Proxy.php', |
|
| 37 | + 'OCA\\User_LDAP\\Handler\\ExtStorageConfigHandler' => $baseDir.'/../lib/Handler/ExtStorageConfigHandler.php', |
|
| 38 | + 'OCA\\User_LDAP\\Helper' => $baseDir.'/../lib/Helper.php', |
|
| 39 | + 'OCA\\User_LDAP\\IGroupLDAP' => $baseDir.'/../lib/IGroupLDAP.php', |
|
| 40 | + 'OCA\\User_LDAP\\ILDAPGroupPlugin' => $baseDir.'/../lib/ILDAPGroupPlugin.php', |
|
| 41 | + 'OCA\\User_LDAP\\ILDAPUserPlugin' => $baseDir.'/../lib/ILDAPUserPlugin.php', |
|
| 42 | + 'OCA\\User_LDAP\\ILDAPWrapper' => $baseDir.'/../lib/ILDAPWrapper.php', |
|
| 43 | + 'OCA\\User_LDAP\\IUserLDAP' => $baseDir.'/../lib/IUserLDAP.php', |
|
| 44 | + 'OCA\\User_LDAP\\Jobs\\CleanUp' => $baseDir.'/../lib/Jobs/CleanUp.php', |
|
| 45 | + 'OCA\\User_LDAP\\Jobs\\Sync' => $baseDir.'/../lib/Jobs/Sync.php', |
|
| 46 | + 'OCA\\User_LDAP\\Jobs\\UpdateGroups' => $baseDir.'/../lib/Jobs/UpdateGroups.php', |
|
| 47 | + 'OCA\\User_LDAP\\LDAP' => $baseDir.'/../lib/LDAP.php', |
|
| 48 | + 'OCA\\User_LDAP\\LDAPProvider' => $baseDir.'/../lib/LDAPProvider.php', |
|
| 49 | + 'OCA\\User_LDAP\\LDAPProviderFactory' => $baseDir.'/../lib/LDAPProviderFactory.php', |
|
| 50 | + 'OCA\\User_LDAP\\LDAPUtility' => $baseDir.'/../lib/LDAPUtility.php', |
|
| 51 | + 'OCA\\User_LDAP\\LogWrapper' => $baseDir.'/../lib/LogWrapper.php', |
|
| 52 | + 'OCA\\User_LDAP\\Mapping\\AbstractMapping' => $baseDir.'/../lib/Mapping/AbstractMapping.php', |
|
| 53 | + 'OCA\\User_LDAP\\Mapping\\GroupMapping' => $baseDir.'/../lib/Mapping/GroupMapping.php', |
|
| 54 | + 'OCA\\User_LDAP\\Mapping\\UserMapping' => $baseDir.'/../lib/Mapping/UserMapping.php', |
|
| 55 | + 'OCA\\User_LDAP\\Migration\\RemoveRefreshTime' => $baseDir.'/../lib/Migration/RemoveRefreshTime.php', |
|
| 56 | + 'OCA\\User_LDAP\\Migration\\SetDefaultProvider' => $baseDir.'/../lib/Migration/SetDefaultProvider.php', |
|
| 57 | + 'OCA\\User_LDAP\\Migration\\UUIDFix' => $baseDir.'/../lib/Migration/UUIDFix.php', |
|
| 58 | + 'OCA\\User_LDAP\\Migration\\UUIDFixGroup' => $baseDir.'/../lib/Migration/UUIDFixGroup.php', |
|
| 59 | + 'OCA\\User_LDAP\\Migration\\UUIDFixInsert' => $baseDir.'/../lib/Migration/UUIDFixInsert.php', |
|
| 60 | + 'OCA\\User_LDAP\\Migration\\UUIDFixUser' => $baseDir.'/../lib/Migration/UUIDFixUser.php', |
|
| 61 | + 'OCA\\User_LDAP\\Migration\\Version1010Date20200630192842' => $baseDir.'/../lib/Migration/Version1010Date20200630192842.php', |
|
| 62 | + 'OCA\\User_LDAP\\Notification\\Notifier' => $baseDir.'/../lib/Notification/Notifier.php', |
|
| 63 | + 'OCA\\User_LDAP\\PagedResults\\IAdapter' => $baseDir.'/../lib/PagedResults/IAdapter.php', |
|
| 64 | + 'OCA\\User_LDAP\\PagedResults\\Php54' => $baseDir.'/../lib/PagedResults/Php54.php', |
|
| 65 | + 'OCA\\User_LDAP\\PagedResults\\Php73' => $baseDir.'/../lib/PagedResults/Php73.php', |
|
| 66 | + 'OCA\\User_LDAP\\PagedResults\\TLinkId' => $baseDir.'/../lib/PagedResults/TLinkId.php', |
|
| 67 | + 'OCA\\User_LDAP\\Proxy' => $baseDir.'/../lib/Proxy.php', |
|
| 68 | + 'OCA\\User_LDAP\\Settings\\Admin' => $baseDir.'/../lib/Settings/Admin.php', |
|
| 69 | + 'OCA\\User_LDAP\\Settings\\Section' => $baseDir.'/../lib/Settings/Section.php', |
|
| 70 | + 'OCA\\User_LDAP\\UserPluginManager' => $baseDir.'/../lib/UserPluginManager.php', |
|
| 71 | + 'OCA\\User_LDAP\\User\\DeletedUsersIndex' => $baseDir.'/../lib/User/DeletedUsersIndex.php', |
|
| 72 | + 'OCA\\User_LDAP\\User\\Manager' => $baseDir.'/../lib/User/Manager.php', |
|
| 73 | + 'OCA\\User_LDAP\\User\\OfflineUser' => $baseDir.'/../lib/User/OfflineUser.php', |
|
| 74 | + 'OCA\\User_LDAP\\User\\User' => $baseDir.'/../lib/User/User.php', |
|
| 75 | + 'OCA\\User_LDAP\\User_LDAP' => $baseDir.'/../lib/User_LDAP.php', |
|
| 76 | + 'OCA\\User_LDAP\\User_Proxy' => $baseDir.'/../lib/User_Proxy.php', |
|
| 77 | + 'OCA\\User_LDAP\\Wizard' => $baseDir.'/../lib/Wizard.php', |
|
| 78 | + 'OCA\\User_LDAP\\WizardResult' => $baseDir.'/../lib/WizardResult.php', |
|
| 79 | 79 | ); |
@@ -37,76 +37,76 @@ |
||
| 37 | 37 | use Symfony\Component\Console\Question\Question; |
| 38 | 38 | |
| 39 | 39 | class ResetUser extends Command { |
| 40 | - /** @var DeletedUsersIndex */ |
|
| 41 | - protected $dui; |
|
| 42 | - /** @var IUserManager */ |
|
| 43 | - private $userManager; |
|
| 44 | - /** @var UserPluginManager */ |
|
| 45 | - private $pluginManager; |
|
| 40 | + /** @var DeletedUsersIndex */ |
|
| 41 | + protected $dui; |
|
| 42 | + /** @var IUserManager */ |
|
| 43 | + private $userManager; |
|
| 44 | + /** @var UserPluginManager */ |
|
| 45 | + private $pluginManager; |
|
| 46 | 46 | |
| 47 | - public function __construct( |
|
| 48 | - DeletedUsersIndex $dui, |
|
| 49 | - IUserManager $userManager, |
|
| 50 | - UserPluginManager $pluginManager |
|
| 51 | - ) { |
|
| 52 | - $this->dui = $dui; |
|
| 53 | - $this->userManager = $userManager; |
|
| 54 | - $this->pluginManager = $pluginManager; |
|
| 55 | - parent::__construct(); |
|
| 56 | - } |
|
| 47 | + public function __construct( |
|
| 48 | + DeletedUsersIndex $dui, |
|
| 49 | + IUserManager $userManager, |
|
| 50 | + UserPluginManager $pluginManager |
|
| 51 | + ) { |
|
| 52 | + $this->dui = $dui; |
|
| 53 | + $this->userManager = $userManager; |
|
| 54 | + $this->pluginManager = $pluginManager; |
|
| 55 | + parent::__construct(); |
|
| 56 | + } |
|
| 57 | 57 | |
| 58 | - protected function configure() { |
|
| 59 | - $this |
|
| 60 | - ->setName('ldap:reset-user') |
|
| 61 | - ->setDescription('deletes an LDAP user independent of the user state') |
|
| 62 | - ->addArgument( |
|
| 63 | - 'uid', |
|
| 64 | - InputArgument::REQUIRED, |
|
| 65 | - 'the user id as used in Nextcloud' |
|
| 66 | - ) |
|
| 67 | - ->addOption( |
|
| 68 | - 'yes', |
|
| 69 | - 'y', |
|
| 70 | - InputOption::VALUE_NONE, |
|
| 71 | - 'do not ask for confirmation' |
|
| 72 | - ); |
|
| 73 | - } |
|
| 58 | + protected function configure() { |
|
| 59 | + $this |
|
| 60 | + ->setName('ldap:reset-user') |
|
| 61 | + ->setDescription('deletes an LDAP user independent of the user state') |
|
| 62 | + ->addArgument( |
|
| 63 | + 'uid', |
|
| 64 | + InputArgument::REQUIRED, |
|
| 65 | + 'the user id as used in Nextcloud' |
|
| 66 | + ) |
|
| 67 | + ->addOption( |
|
| 68 | + 'yes', |
|
| 69 | + 'y', |
|
| 70 | + InputOption::VALUE_NONE, |
|
| 71 | + 'do not ask for confirmation' |
|
| 72 | + ); |
|
| 73 | + } |
|
| 74 | 74 | |
| 75 | - protected function execute(InputInterface $input, OutputInterface $output): int { |
|
| 76 | - try { |
|
| 77 | - $uid = $input->getArgument('uid'); |
|
| 78 | - $user = $this->userManager->get($uid); |
|
| 79 | - if (!$user instanceof IUser) { |
|
| 80 | - throw new \Exception('User not found'); |
|
| 81 | - } |
|
| 82 | - $backend = $user->getBackend(); |
|
| 83 | - if (!$backend instanceof User_Proxy) { |
|
| 84 | - throw new \Exception('The given user is not a recognized LDAP user.'); |
|
| 85 | - } |
|
| 86 | - if ($input->getOption('yes') === false) { |
|
| 87 | - /** @var QuestionHelper $helper */ |
|
| 88 | - $helper = $this->getHelper('question'); |
|
| 89 | - $q = new Question('Delete all local data of this user (y|N)? '); |
|
| 90 | - $input->setOption('yes', $helper->ask($input, $output, $q) === 'y'); |
|
| 91 | - } |
|
| 92 | - if ($input->getOption('yes') !== true) { |
|
| 93 | - throw new \Exception('Reset cancelled by operator'); |
|
| 94 | - } |
|
| 75 | + protected function execute(InputInterface $input, OutputInterface $output): int { |
|
| 76 | + try { |
|
| 77 | + $uid = $input->getArgument('uid'); |
|
| 78 | + $user = $this->userManager->get($uid); |
|
| 79 | + if (!$user instanceof IUser) { |
|
| 80 | + throw new \Exception('User not found'); |
|
| 81 | + } |
|
| 82 | + $backend = $user->getBackend(); |
|
| 83 | + if (!$backend instanceof User_Proxy) { |
|
| 84 | + throw new \Exception('The given user is not a recognized LDAP user.'); |
|
| 85 | + } |
|
| 86 | + if ($input->getOption('yes') === false) { |
|
| 87 | + /** @var QuestionHelper $helper */ |
|
| 88 | + $helper = $this->getHelper('question'); |
|
| 89 | + $q = new Question('Delete all local data of this user (y|N)? '); |
|
| 90 | + $input->setOption('yes', $helper->ask($input, $output, $q) === 'y'); |
|
| 91 | + } |
|
| 92 | + if ($input->getOption('yes') !== true) { |
|
| 93 | + throw new \Exception('Reset cancelled by operator'); |
|
| 94 | + } |
|
| 95 | 95 | |
| 96 | - $this->dui->markUser($uid); |
|
| 97 | - $pluginManagerSuppressed = $this->pluginManager->setSuppressDeletion(true); |
|
| 98 | - if ($user->delete()) { |
|
| 99 | - $this->pluginManager->setSuppressDeletion($pluginManagerSuppressed); |
|
| 100 | - return 0; |
|
| 101 | - } |
|
| 102 | - } catch (\Throwable $e) { |
|
| 103 | - if (isset($pluginManagerSuppressed)) { |
|
| 104 | - $this->pluginManager->setSuppressDeletion($pluginManagerSuppressed); |
|
| 105 | - } |
|
| 106 | - $output->writeln('<error>' . $e->getMessage() . '</error>'); |
|
| 107 | - return 1; |
|
| 108 | - } |
|
| 109 | - $output->writeln('<error>Error while resetting user</error>'); |
|
| 110 | - return 2; |
|
| 111 | - } |
|
| 96 | + $this->dui->markUser($uid); |
|
| 97 | + $pluginManagerSuppressed = $this->pluginManager->setSuppressDeletion(true); |
|
| 98 | + if ($user->delete()) { |
|
| 99 | + $this->pluginManager->setSuppressDeletion($pluginManagerSuppressed); |
|
| 100 | + return 0; |
|
| 101 | + } |
|
| 102 | + } catch (\Throwable $e) { |
|
| 103 | + if (isset($pluginManagerSuppressed)) { |
|
| 104 | + $this->pluginManager->setSuppressDeletion($pluginManagerSuppressed); |
|
| 105 | + } |
|
| 106 | + $output->writeln('<error>' . $e->getMessage() . '</error>'); |
|
| 107 | + return 1; |
|
| 108 | + } |
|
| 109 | + $output->writeln('<error>Error while resetting user</error>'); |
|
| 110 | + return 2; |
|
| 111 | + } |
|
| 112 | 112 | } |
@@ -103,7 +103,7 @@ |
||
| 103 | 103 | if (isset($pluginManagerSuppressed)) { |
| 104 | 104 | $this->pluginManager->setSuppressDeletion($pluginManagerSuppressed); |
| 105 | 105 | } |
| 106 | - $output->writeln('<error>' . $e->getMessage() . '</error>'); |
|
| 106 | + $output->writeln('<error>'.$e->getMessage().'</error>'); |
|
| 107 | 107 | return 1; |
| 108 | 108 | } |
| 109 | 109 | $output->writeln('<error>Error while resetting user</error>'); |
@@ -28,197 +28,197 @@ |
||
| 28 | 28 | use OC\User\Backend; |
| 29 | 29 | |
| 30 | 30 | class UserPluginManager { |
| 31 | - private $respondToActions = 0; |
|
| 32 | - |
|
| 33 | - private $which = [ |
|
| 34 | - Backend::CREATE_USER => null, |
|
| 35 | - Backend::SET_PASSWORD => null, |
|
| 36 | - Backend::GET_HOME => null, |
|
| 37 | - Backend::GET_DISPLAYNAME => null, |
|
| 38 | - Backend::SET_DISPLAYNAME => null, |
|
| 39 | - Backend::PROVIDE_AVATAR => null, |
|
| 40 | - Backend::COUNT_USERS => null, |
|
| 41 | - 'deleteUser' => null |
|
| 42 | - ]; |
|
| 43 | - |
|
| 44 | - /** @var bool */ |
|
| 45 | - private $suppressDeletion = false; |
|
| 46 | - |
|
| 47 | - /** |
|
| 48 | - * @return int All implemented actions, except for 'deleteUser' |
|
| 49 | - */ |
|
| 50 | - public function getImplementedActions() { |
|
| 51 | - return $this->respondToActions; |
|
| 52 | - } |
|
| 53 | - |
|
| 54 | - /** |
|
| 55 | - * Registers a user plugin that may implement some actions, overriding User_LDAP's user actions. |
|
| 56 | - * |
|
| 57 | - * @param ILDAPUserPlugin $plugin |
|
| 58 | - */ |
|
| 59 | - public function register(ILDAPUserPlugin $plugin) { |
|
| 60 | - $respondToActions = $plugin->respondToActions(); |
|
| 61 | - $this->respondToActions |= $respondToActions; |
|
| 62 | - |
|
| 63 | - foreach ($this->which as $action => $v) { |
|
| 64 | - if (is_int($action) && (bool)($respondToActions & $action)) { |
|
| 65 | - $this->which[$action] = $plugin; |
|
| 66 | - \OC::$server->getLogger()->debug("Registered action ".$action." to plugin ".get_class($plugin), ['app' => 'user_ldap']); |
|
| 67 | - } |
|
| 68 | - } |
|
| 69 | - if (method_exists($plugin,'deleteUser')) { |
|
| 70 | - $this->which['deleteUser'] = $plugin; |
|
| 71 | - \OC::$server->getLogger()->debug("Registered action deleteUser to plugin ".get_class($plugin), ['app' => 'user_ldap']); |
|
| 72 | - } |
|
| 73 | - } |
|
| 74 | - |
|
| 75 | - /** |
|
| 76 | - * Signal if there is a registered plugin that implements some given actions |
|
| 77 | - * @param int $actions Actions defined in \OC\User\Backend, like Backend::CREATE_USER |
|
| 78 | - * @return bool |
|
| 79 | - */ |
|
| 80 | - public function implementsActions($actions) { |
|
| 81 | - return ($actions & $this->respondToActions) == $actions; |
|
| 82 | - } |
|
| 83 | - |
|
| 84 | - /** |
|
| 85 | - * Create a new user in LDAP Backend |
|
| 86 | - * |
|
| 87 | - * @param string $username The username of the user to create |
|
| 88 | - * @param string $password The password of the new user |
|
| 89 | - * @return string | false The user DN if user creation was successful. |
|
| 90 | - * @throws \Exception |
|
| 91 | - */ |
|
| 92 | - public function createUser($username, $password) { |
|
| 93 | - $plugin = $this->which[Backend::CREATE_USER]; |
|
| 94 | - |
|
| 95 | - if ($plugin) { |
|
| 96 | - return $plugin->createUser($username,$password); |
|
| 97 | - } |
|
| 98 | - throw new \Exception('No plugin implements createUser in this LDAP Backend.'); |
|
| 99 | - } |
|
| 100 | - |
|
| 101 | - /** |
|
| 102 | - * Change the password of a user* |
|
| 103 | - * @param string $uid The username |
|
| 104 | - * @param string $password The new password |
|
| 105 | - * @return bool |
|
| 106 | - * @throws \Exception |
|
| 107 | - */ |
|
| 108 | - public function setPassword($uid, $password) { |
|
| 109 | - $plugin = $this->which[Backend::SET_PASSWORD]; |
|
| 110 | - |
|
| 111 | - if ($plugin) { |
|
| 112 | - return $plugin->setPassword($uid,$password); |
|
| 113 | - } |
|
| 114 | - throw new \Exception('No plugin implements setPassword in this LDAP Backend.'); |
|
| 115 | - } |
|
| 116 | - |
|
| 117 | - /** |
|
| 118 | - * checks whether the user is allowed to change his avatar in Nextcloud |
|
| 119 | - * @param string $uid the Nextcloud user name |
|
| 120 | - * @return boolean either the user can or cannot |
|
| 121 | - * @throws \Exception |
|
| 122 | - */ |
|
| 123 | - public function canChangeAvatar($uid) { |
|
| 124 | - $plugin = $this->which[Backend::PROVIDE_AVATAR]; |
|
| 125 | - |
|
| 126 | - if ($plugin) { |
|
| 127 | - return $plugin->canChangeAvatar($uid); |
|
| 128 | - } |
|
| 129 | - throw new \Exception('No plugin implements canChangeAvatar in this LDAP Backend.'); |
|
| 130 | - } |
|
| 131 | - |
|
| 132 | - /** |
|
| 133 | - * Get the user's home directory |
|
| 134 | - * @param string $uid the username |
|
| 135 | - * @return boolean |
|
| 136 | - * @throws \Exception |
|
| 137 | - */ |
|
| 138 | - public function getHome($uid) { |
|
| 139 | - $plugin = $this->which[Backend::GET_HOME]; |
|
| 140 | - |
|
| 141 | - if ($plugin) { |
|
| 142 | - return $plugin->getHome($uid); |
|
| 143 | - } |
|
| 144 | - throw new \Exception('No plugin implements getHome in this LDAP Backend.'); |
|
| 145 | - } |
|
| 146 | - |
|
| 147 | - /** |
|
| 148 | - * Get display name of the user |
|
| 149 | - * @param string $uid user ID of the user |
|
| 150 | - * @return string display name |
|
| 151 | - * @throws \Exception |
|
| 152 | - */ |
|
| 153 | - public function getDisplayName($uid) { |
|
| 154 | - $plugin = $this->which[Backend::GET_DISPLAYNAME]; |
|
| 155 | - |
|
| 156 | - if ($plugin) { |
|
| 157 | - return $plugin->getDisplayName($uid); |
|
| 158 | - } |
|
| 159 | - throw new \Exception('No plugin implements getDisplayName in this LDAP Backend.'); |
|
| 160 | - } |
|
| 161 | - |
|
| 162 | - /** |
|
| 163 | - * Set display name of the user |
|
| 164 | - * @param string $uid user ID of the user |
|
| 165 | - * @param string $displayName new user's display name |
|
| 166 | - * @return string display name |
|
| 167 | - * @throws \Exception |
|
| 168 | - */ |
|
| 169 | - public function setDisplayName($uid, $displayName) { |
|
| 170 | - $plugin = $this->which[Backend::SET_DISPLAYNAME]; |
|
| 171 | - |
|
| 172 | - if ($plugin) { |
|
| 173 | - return $plugin->setDisplayName($uid, $displayName); |
|
| 174 | - } |
|
| 175 | - throw new \Exception('No plugin implements setDisplayName in this LDAP Backend.'); |
|
| 176 | - } |
|
| 177 | - |
|
| 178 | - /** |
|
| 179 | - * Count the number of users |
|
| 180 | - * @return int|bool |
|
| 181 | - * @throws \Exception |
|
| 182 | - */ |
|
| 183 | - public function countUsers() { |
|
| 184 | - $plugin = $this->which[Backend::COUNT_USERS]; |
|
| 185 | - |
|
| 186 | - if ($plugin) { |
|
| 187 | - return $plugin->countUsers(); |
|
| 188 | - } |
|
| 189 | - throw new \Exception('No plugin implements countUsers in this LDAP Backend.'); |
|
| 190 | - } |
|
| 191 | - |
|
| 192 | - /** |
|
| 193 | - * @return bool |
|
| 194 | - */ |
|
| 195 | - public function canDeleteUser() { |
|
| 196 | - return !$this->suppressDeletion && $this->which['deleteUser'] !== null; |
|
| 197 | - } |
|
| 198 | - |
|
| 199 | - /** |
|
| 200 | - * @param $uid |
|
| 201 | - * @return bool |
|
| 202 | - * @throws \Exception |
|
| 203 | - */ |
|
| 204 | - public function deleteUser($uid) { |
|
| 205 | - $plugin = $this->which['deleteUser']; |
|
| 206 | - if ($plugin) { |
|
| 207 | - if ($this->suppressDeletion) { |
|
| 208 | - return false; |
|
| 209 | - } |
|
| 210 | - return $plugin->deleteUser($uid); |
|
| 211 | - } |
|
| 212 | - throw new \Exception('No plugin implements deleteUser in this LDAP Backend.'); |
|
| 213 | - } |
|
| 214 | - |
|
| 215 | - /** |
|
| 216 | - * @param bool $value |
|
| 217 | - * @return bool – the value before the change |
|
| 218 | - */ |
|
| 219 | - public function setSuppressDeletion(bool $value): bool { |
|
| 220 | - $old = $this->suppressDeletion; |
|
| 221 | - $this->suppressDeletion = $value; |
|
| 222 | - return $old; |
|
| 223 | - } |
|
| 31 | + private $respondToActions = 0; |
|
| 32 | + |
|
| 33 | + private $which = [ |
|
| 34 | + Backend::CREATE_USER => null, |
|
| 35 | + Backend::SET_PASSWORD => null, |
|
| 36 | + Backend::GET_HOME => null, |
|
| 37 | + Backend::GET_DISPLAYNAME => null, |
|
| 38 | + Backend::SET_DISPLAYNAME => null, |
|
| 39 | + Backend::PROVIDE_AVATAR => null, |
|
| 40 | + Backend::COUNT_USERS => null, |
|
| 41 | + 'deleteUser' => null |
|
| 42 | + ]; |
|
| 43 | + |
|
| 44 | + /** @var bool */ |
|
| 45 | + private $suppressDeletion = false; |
|
| 46 | + |
|
| 47 | + /** |
|
| 48 | + * @return int All implemented actions, except for 'deleteUser' |
|
| 49 | + */ |
|
| 50 | + public function getImplementedActions() { |
|
| 51 | + return $this->respondToActions; |
|
| 52 | + } |
|
| 53 | + |
|
| 54 | + /** |
|
| 55 | + * Registers a user plugin that may implement some actions, overriding User_LDAP's user actions. |
|
| 56 | + * |
|
| 57 | + * @param ILDAPUserPlugin $plugin |
|
| 58 | + */ |
|
| 59 | + public function register(ILDAPUserPlugin $plugin) { |
|
| 60 | + $respondToActions = $plugin->respondToActions(); |
|
| 61 | + $this->respondToActions |= $respondToActions; |
|
| 62 | + |
|
| 63 | + foreach ($this->which as $action => $v) { |
|
| 64 | + if (is_int($action) && (bool)($respondToActions & $action)) { |
|
| 65 | + $this->which[$action] = $plugin; |
|
| 66 | + \OC::$server->getLogger()->debug("Registered action ".$action." to plugin ".get_class($plugin), ['app' => 'user_ldap']); |
|
| 67 | + } |
|
| 68 | + } |
|
| 69 | + if (method_exists($plugin,'deleteUser')) { |
|
| 70 | + $this->which['deleteUser'] = $plugin; |
|
| 71 | + \OC::$server->getLogger()->debug("Registered action deleteUser to plugin ".get_class($plugin), ['app' => 'user_ldap']); |
|
| 72 | + } |
|
| 73 | + } |
|
| 74 | + |
|
| 75 | + /** |
|
| 76 | + * Signal if there is a registered plugin that implements some given actions |
|
| 77 | + * @param int $actions Actions defined in \OC\User\Backend, like Backend::CREATE_USER |
|
| 78 | + * @return bool |
|
| 79 | + */ |
|
| 80 | + public function implementsActions($actions) { |
|
| 81 | + return ($actions & $this->respondToActions) == $actions; |
|
| 82 | + } |
|
| 83 | + |
|
| 84 | + /** |
|
| 85 | + * Create a new user in LDAP Backend |
|
| 86 | + * |
|
| 87 | + * @param string $username The username of the user to create |
|
| 88 | + * @param string $password The password of the new user |
|
| 89 | + * @return string | false The user DN if user creation was successful. |
|
| 90 | + * @throws \Exception |
|
| 91 | + */ |
|
| 92 | + public function createUser($username, $password) { |
|
| 93 | + $plugin = $this->which[Backend::CREATE_USER]; |
|
| 94 | + |
|
| 95 | + if ($plugin) { |
|
| 96 | + return $plugin->createUser($username,$password); |
|
| 97 | + } |
|
| 98 | + throw new \Exception('No plugin implements createUser in this LDAP Backend.'); |
|
| 99 | + } |
|
| 100 | + |
|
| 101 | + /** |
|
| 102 | + * Change the password of a user* |
|
| 103 | + * @param string $uid The username |
|
| 104 | + * @param string $password The new password |
|
| 105 | + * @return bool |
|
| 106 | + * @throws \Exception |
|
| 107 | + */ |
|
| 108 | + public function setPassword($uid, $password) { |
|
| 109 | + $plugin = $this->which[Backend::SET_PASSWORD]; |
|
| 110 | + |
|
| 111 | + if ($plugin) { |
|
| 112 | + return $plugin->setPassword($uid,$password); |
|
| 113 | + } |
|
| 114 | + throw new \Exception('No plugin implements setPassword in this LDAP Backend.'); |
|
| 115 | + } |
|
| 116 | + |
|
| 117 | + /** |
|
| 118 | + * checks whether the user is allowed to change his avatar in Nextcloud |
|
| 119 | + * @param string $uid the Nextcloud user name |
|
| 120 | + * @return boolean either the user can or cannot |
|
| 121 | + * @throws \Exception |
|
| 122 | + */ |
|
| 123 | + public function canChangeAvatar($uid) { |
|
| 124 | + $plugin = $this->which[Backend::PROVIDE_AVATAR]; |
|
| 125 | + |
|
| 126 | + if ($plugin) { |
|
| 127 | + return $plugin->canChangeAvatar($uid); |
|
| 128 | + } |
|
| 129 | + throw new \Exception('No plugin implements canChangeAvatar in this LDAP Backend.'); |
|
| 130 | + } |
|
| 131 | + |
|
| 132 | + /** |
|
| 133 | + * Get the user's home directory |
|
| 134 | + * @param string $uid the username |
|
| 135 | + * @return boolean |
|
| 136 | + * @throws \Exception |
|
| 137 | + */ |
|
| 138 | + public function getHome($uid) { |
|
| 139 | + $plugin = $this->which[Backend::GET_HOME]; |
|
| 140 | + |
|
| 141 | + if ($plugin) { |
|
| 142 | + return $plugin->getHome($uid); |
|
| 143 | + } |
|
| 144 | + throw new \Exception('No plugin implements getHome in this LDAP Backend.'); |
|
| 145 | + } |
|
| 146 | + |
|
| 147 | + /** |
|
| 148 | + * Get display name of the user |
|
| 149 | + * @param string $uid user ID of the user |
|
| 150 | + * @return string display name |
|
| 151 | + * @throws \Exception |
|
| 152 | + */ |
|
| 153 | + public function getDisplayName($uid) { |
|
| 154 | + $plugin = $this->which[Backend::GET_DISPLAYNAME]; |
|
| 155 | + |
|
| 156 | + if ($plugin) { |
|
| 157 | + return $plugin->getDisplayName($uid); |
|
| 158 | + } |
|
| 159 | + throw new \Exception('No plugin implements getDisplayName in this LDAP Backend.'); |
|
| 160 | + } |
|
| 161 | + |
|
| 162 | + /** |
|
| 163 | + * Set display name of the user |
|
| 164 | + * @param string $uid user ID of the user |
|
| 165 | + * @param string $displayName new user's display name |
|
| 166 | + * @return string display name |
|
| 167 | + * @throws \Exception |
|
| 168 | + */ |
|
| 169 | + public function setDisplayName($uid, $displayName) { |
|
| 170 | + $plugin = $this->which[Backend::SET_DISPLAYNAME]; |
|
| 171 | + |
|
| 172 | + if ($plugin) { |
|
| 173 | + return $plugin->setDisplayName($uid, $displayName); |
|
| 174 | + } |
|
| 175 | + throw new \Exception('No plugin implements setDisplayName in this LDAP Backend.'); |
|
| 176 | + } |
|
| 177 | + |
|
| 178 | + /** |
|
| 179 | + * Count the number of users |
|
| 180 | + * @return int|bool |
|
| 181 | + * @throws \Exception |
|
| 182 | + */ |
|
| 183 | + public function countUsers() { |
|
| 184 | + $plugin = $this->which[Backend::COUNT_USERS]; |
|
| 185 | + |
|
| 186 | + if ($plugin) { |
|
| 187 | + return $plugin->countUsers(); |
|
| 188 | + } |
|
| 189 | + throw new \Exception('No plugin implements countUsers in this LDAP Backend.'); |
|
| 190 | + } |
|
| 191 | + |
|
| 192 | + /** |
|
| 193 | + * @return bool |
|
| 194 | + */ |
|
| 195 | + public function canDeleteUser() { |
|
| 196 | + return !$this->suppressDeletion && $this->which['deleteUser'] !== null; |
|
| 197 | + } |
|
| 198 | + |
|
| 199 | + /** |
|
| 200 | + * @param $uid |
|
| 201 | + * @return bool |
|
| 202 | + * @throws \Exception |
|
| 203 | + */ |
|
| 204 | + public function deleteUser($uid) { |
|
| 205 | + $plugin = $this->which['deleteUser']; |
|
| 206 | + if ($plugin) { |
|
| 207 | + if ($this->suppressDeletion) { |
|
| 208 | + return false; |
|
| 209 | + } |
|
| 210 | + return $plugin->deleteUser($uid); |
|
| 211 | + } |
|
| 212 | + throw new \Exception('No plugin implements deleteUser in this LDAP Backend.'); |
|
| 213 | + } |
|
| 214 | + |
|
| 215 | + /** |
|
| 216 | + * @param bool $value |
|
| 217 | + * @return bool – the value before the change |
|
| 218 | + */ |
|
| 219 | + public function setSuppressDeletion(bool $value): bool { |
|
| 220 | + $old = $this->suppressDeletion; |
|
| 221 | + $this->suppressDeletion = $value; |
|
| 222 | + return $old; |
|
| 223 | + } |
|
| 224 | 224 | } |