@@ -49,135 +49,135 @@ |
||
| 49 | 49 | $application->add(new OC\Core\Command\App\CheckCode()); |
| 50 | 50 | $application->add(new OC\Core\Command\L10n\CreateJs()); |
| 51 | 51 | $application->add(new \OC\Core\Command\Integrity\SignApp( |
| 52 | - \OC::$server->getIntegrityCodeChecker(), |
|
| 53 | - new \OC\IntegrityCheck\Helpers\FileAccessHelper(), |
|
| 54 | - \OC::$server->getURLGenerator() |
|
| 52 | + \OC::$server->getIntegrityCodeChecker(), |
|
| 53 | + new \OC\IntegrityCheck\Helpers\FileAccessHelper(), |
|
| 54 | + \OC::$server->getURLGenerator() |
|
| 55 | 55 | )); |
| 56 | 56 | $application->add(new \OC\Core\Command\Integrity\SignCore( |
| 57 | - \OC::$server->getIntegrityCodeChecker(), |
|
| 58 | - new \OC\IntegrityCheck\Helpers\FileAccessHelper() |
|
| 57 | + \OC::$server->getIntegrityCodeChecker(), |
|
| 58 | + new \OC\IntegrityCheck\Helpers\FileAccessHelper() |
|
| 59 | 59 | )); |
| 60 | 60 | $application->add(new \OC\Core\Command\Integrity\CheckApp( |
| 61 | - \OC::$server->getIntegrityCodeChecker() |
|
| 61 | + \OC::$server->getIntegrityCodeChecker() |
|
| 62 | 62 | )); |
| 63 | 63 | $application->add(new \OC\Core\Command\Integrity\CheckCore( |
| 64 | - \OC::$server->getIntegrityCodeChecker() |
|
| 64 | + \OC::$server->getIntegrityCodeChecker() |
|
| 65 | 65 | )); |
| 66 | 66 | |
| 67 | 67 | |
| 68 | 68 | if (\OC::$server->getConfig()->getSystemValue('installed', false)) { |
| 69 | - $application->add(new OC\Core\Command\App\Disable(\OC::$server->getAppManager())); |
|
| 70 | - $application->add(new OC\Core\Command\App\Enable(\OC::$server->getAppManager(), \OC::$server->getGroupManager())); |
|
| 71 | - $application->add(new OC\Core\Command\App\Install()); |
|
| 72 | - $application->add(new OC\Core\Command\App\GetPath()); |
|
| 73 | - $application->add(new OC\Core\Command\App\ListApps(\OC::$server->getAppManager())); |
|
| 74 | - $application->add(new OC\Core\Command\App\Remove(\OC::$server->getAppManager(), \OC::$server->query(\OC\Installer::class), \OC::$server->getLogger())); |
|
| 75 | - $application->add(\OC::$server->query(\OC\Core\Command\App\Update::class)); |
|
| 76 | - |
|
| 77 | - $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Cleanup::class)); |
|
| 78 | - $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enforce::class)); |
|
| 79 | - $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enable::class)); |
|
| 80 | - $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Disable::class)); |
|
| 81 | - $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\State::class)); |
|
| 82 | - |
|
| 83 | - $application->add(new OC\Core\Command\Background\Cron(\OC::$server->getConfig())); |
|
| 84 | - $application->add(new OC\Core\Command\Background\WebCron(\OC::$server->getConfig())); |
|
| 85 | - $application->add(new OC\Core\Command\Background\Ajax(\OC::$server->getConfig())); |
|
| 86 | - |
|
| 87 | - $application->add(\OC::$server->query(\OC\Core\Command\Broadcast\Test::class)); |
|
| 88 | - |
|
| 89 | - $application->add(new OC\Core\Command\Config\App\DeleteConfig(\OC::$server->getConfig())); |
|
| 90 | - $application->add(new OC\Core\Command\Config\App\GetConfig(\OC::$server->getConfig())); |
|
| 91 | - $application->add(new OC\Core\Command\Config\App\SetConfig(\OC::$server->getConfig())); |
|
| 92 | - $application->add(new OC\Core\Command\Config\Import(\OC::$server->getConfig())); |
|
| 93 | - $application->add(new OC\Core\Command\Config\ListConfigs(\OC::$server->getSystemConfig(), \OC::$server->getAppConfig())); |
|
| 94 | - $application->add(new OC\Core\Command\Config\System\DeleteConfig(\OC::$server->getSystemConfig())); |
|
| 95 | - $application->add(new OC\Core\Command\Config\System\GetConfig(\OC::$server->getSystemConfig())); |
|
| 96 | - $application->add(new OC\Core\Command\Config\System\SetConfig(\OC::$server->getSystemConfig())); |
|
| 97 | - |
|
| 98 | - $application->add(new OC\Core\Command\Db\ConvertType(\OC::$server->getConfig(), new \OC\DB\ConnectionFactory(\OC::$server->getSystemConfig()))); |
|
| 99 | - $application->add(new OC\Core\Command\Db\ConvertMysqlToMB4(\OC::$server->getConfig(), \OC::$server->getDatabaseConnection(), \OC::$server->getURLGenerator(), \OC::$server->getLogger())); |
|
| 100 | - $application->add(new OC\Core\Command\Db\ConvertFilecacheBigInt(\OC::$server->getDatabaseConnection())); |
|
| 101 | - $application->add(new OC\Core\Command\Db\AddMissingIndices(\OC::$server->getDatabaseConnection(), \OC::$server->getEventDispatcher())); |
|
| 102 | - $application->add(new OC\Core\Command\Db\AddMissingColumns(\OC::$server->getDatabaseConnection(), \OC::$server->getEventDispatcher())); |
|
| 103 | - $application->add(new OC\Core\Command\Db\Migrations\StatusCommand(\OC::$server->getDatabaseConnection())); |
|
| 104 | - $application->add(new OC\Core\Command\Db\Migrations\MigrateCommand(\OC::$server->getDatabaseConnection())); |
|
| 105 | - $application->add(new OC\Core\Command\Db\Migrations\GenerateCommand(\OC::$server->getDatabaseConnection(), \OC::$server->getAppManager())); |
|
| 106 | - $application->add(new OC\Core\Command\Db\Migrations\GenerateFromSchemaFileCommand(\OC::$server->getConfig(), \OC::$server->getAppManager(), \OC::$server->getDatabaseConnection())); |
|
| 107 | - $application->add(new OC\Core\Command\Db\Migrations\ExecuteCommand(\OC::$server->getDatabaseConnection(), \OC::$server->getAppManager(), \OC::$server->getConfig())); |
|
| 108 | - |
|
| 109 | - $application->add(new OC\Core\Command\Encryption\Disable(\OC::$server->getConfig())); |
|
| 110 | - $application->add(new OC\Core\Command\Encryption\Enable(\OC::$server->getConfig(), \OC::$server->getEncryptionManager())); |
|
| 111 | - $application->add(new OC\Core\Command\Encryption\ListModules(\OC::$server->getEncryptionManager(), \OC::$server->getConfig())); |
|
| 112 | - $application->add(new OC\Core\Command\Encryption\SetDefaultModule(\OC::$server->getEncryptionManager(), \OC::$server->getConfig())); |
|
| 113 | - $application->add(new OC\Core\Command\Encryption\Status(\OC::$server->getEncryptionManager())); |
|
| 114 | - $application->add(new OC\Core\Command\Encryption\EncryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getAppManager(), \OC::$server->getConfig(), new \Symfony\Component\Console\Helper\QuestionHelper())); |
|
| 115 | - $application->add(new OC\Core\Command\Encryption\DecryptAll( |
|
| 116 | - \OC::$server->getEncryptionManager(), |
|
| 117 | - \OC::$server->getAppManager(), |
|
| 118 | - \OC::$server->getConfig(), |
|
| 119 | - new \OC\Encryption\DecryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getUserManager(), new \OC\Files\View()), |
|
| 120 | - new \Symfony\Component\Console\Helper\QuestionHelper()) |
|
| 121 | - ); |
|
| 122 | - |
|
| 123 | - $application->add(new OC\Core\Command\Log\Manage(\OC::$server->getConfig())); |
|
| 124 | - $application->add(new OC\Core\Command\Log\File(\OC::$server->getConfig())); |
|
| 125 | - |
|
| 126 | - $view = new \OC\Files\View(); |
|
| 127 | - $util = new \OC\Encryption\Util( |
|
| 128 | - $view, |
|
| 129 | - \OC::$server->getUserManager(), |
|
| 130 | - \OC::$server->getGroupManager(), |
|
| 131 | - \OC::$server->getConfig() |
|
| 132 | - ); |
|
| 133 | - $application->add(new OC\Core\Command\Encryption\ChangeKeyStorageRoot( |
|
| 134 | - $view, |
|
| 135 | - \OC::$server->getUserManager(), |
|
| 136 | - \OC::$server->getConfig(), |
|
| 137 | - $util, |
|
| 138 | - new \Symfony\Component\Console\Helper\QuestionHelper() |
|
| 139 | - ) |
|
| 140 | - ); |
|
| 141 | - $application->add(new OC\Core\Command\Encryption\ShowKeyStorageRoot($util)); |
|
| 142 | - |
|
| 143 | - $application->add(new OC\Core\Command\Maintenance\DataFingerprint(\OC::$server->getConfig(), new \OC\AppFramework\Utility\TimeFactory())); |
|
| 144 | - $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateDB(\OC::$server->getMimeTypeDetector(), \OC::$server->getMimeTypeLoader())); |
|
| 145 | - $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateJS(\OC::$server->getMimeTypeDetector())); |
|
| 146 | - $application->add(new OC\Core\Command\Maintenance\Mode(\OC::$server->getConfig())); |
|
| 147 | - $application->add(new OC\Core\Command\Maintenance\UpdateHtaccess()); |
|
| 148 | - $application->add(new OC\Core\Command\Maintenance\UpdateTheme(\OC::$server->getMimeTypeDetector(), \OC::$server->getMemCacheFactory())); |
|
| 149 | - |
|
| 150 | - $application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->getLogger(), \OC::$server->query(\OC\Installer::class))); |
|
| 151 | - $application->add(new OC\Core\Command\Maintenance\Repair( |
|
| 152 | - new \OC\Repair([], \OC::$server->getEventDispatcher()), |
|
| 153 | - \OC::$server->getConfig(), |
|
| 154 | - \OC::$server->getEventDispatcher(), |
|
| 155 | - \OC::$server->getAppManager() |
|
| 156 | - )); |
|
| 157 | - |
|
| 158 | - $application->add(\OC::$server->query(\OC\Core\Command\Preview\Repair::class)); |
|
| 159 | - |
|
| 160 | - $application->add(new OC\Core\Command\User\Add(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 161 | - $application->add(new OC\Core\Command\User\Delete(\OC::$server->getUserManager())); |
|
| 162 | - $application->add(new OC\Core\Command\User\Disable(\OC::$server->getUserManager())); |
|
| 163 | - $application->add(new OC\Core\Command\User\Enable(\OC::$server->getUserManager())); |
|
| 164 | - $application->add(new OC\Core\Command\User\LastSeen(\OC::$server->getUserManager())); |
|
| 165 | - $application->add(\OC::$server->get(\OC\Core\Command\User\Report::class)); |
|
| 166 | - $application->add(new OC\Core\Command\User\ResetPassword(\OC::$server->getUserManager())); |
|
| 167 | - $application->add(new OC\Core\Command\User\Setting(\OC::$server->getUserManager(), \OC::$server->getConfig(), \OC::$server->getDatabaseConnection())); |
|
| 168 | - $application->add(new OC\Core\Command\User\ListCommand(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 169 | - $application->add(new OC\Core\Command\User\Info(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 170 | - |
|
| 171 | - $application->add(new OC\Core\Command\Group\Add(\OC::$server->getGroupManager())); |
|
| 172 | - $application->add(new OC\Core\Command\Group\Delete(\OC::$server->getGroupManager())); |
|
| 173 | - $application->add(new OC\Core\Command\Group\ListCommand(\OC::$server->getGroupManager())); |
|
| 174 | - $application->add(new OC\Core\Command\Group\AddUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 175 | - $application->add(new OC\Core\Command\Group\RemoveUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 176 | - |
|
| 177 | - $application->add(new OC\Core\Command\Security\ListCertificates(\OC::$server->getCertificateManager(null), \OC::$server->getL10N('core'))); |
|
| 178 | - $application->add(new OC\Core\Command\Security\ImportCertificate(\OC::$server->getCertificateManager(null))); |
|
| 179 | - $application->add(new OC\Core\Command\Security\RemoveCertificate(\OC::$server->getCertificateManager(null))); |
|
| 180 | - $application->add(new OC\Core\Command\Security\ResetBruteforceAttempts(\OC::$server->getBruteForceThrottler())); |
|
| 69 | + $application->add(new OC\Core\Command\App\Disable(\OC::$server->getAppManager())); |
|
| 70 | + $application->add(new OC\Core\Command\App\Enable(\OC::$server->getAppManager(), \OC::$server->getGroupManager())); |
|
| 71 | + $application->add(new OC\Core\Command\App\Install()); |
|
| 72 | + $application->add(new OC\Core\Command\App\GetPath()); |
|
| 73 | + $application->add(new OC\Core\Command\App\ListApps(\OC::$server->getAppManager())); |
|
| 74 | + $application->add(new OC\Core\Command\App\Remove(\OC::$server->getAppManager(), \OC::$server->query(\OC\Installer::class), \OC::$server->getLogger())); |
|
| 75 | + $application->add(\OC::$server->query(\OC\Core\Command\App\Update::class)); |
|
| 76 | + |
|
| 77 | + $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Cleanup::class)); |
|
| 78 | + $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enforce::class)); |
|
| 79 | + $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enable::class)); |
|
| 80 | + $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Disable::class)); |
|
| 81 | + $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\State::class)); |
|
| 82 | + |
|
| 83 | + $application->add(new OC\Core\Command\Background\Cron(\OC::$server->getConfig())); |
|
| 84 | + $application->add(new OC\Core\Command\Background\WebCron(\OC::$server->getConfig())); |
|
| 85 | + $application->add(new OC\Core\Command\Background\Ajax(\OC::$server->getConfig())); |
|
| 86 | + |
|
| 87 | + $application->add(\OC::$server->query(\OC\Core\Command\Broadcast\Test::class)); |
|
| 88 | + |
|
| 89 | + $application->add(new OC\Core\Command\Config\App\DeleteConfig(\OC::$server->getConfig())); |
|
| 90 | + $application->add(new OC\Core\Command\Config\App\GetConfig(\OC::$server->getConfig())); |
|
| 91 | + $application->add(new OC\Core\Command\Config\App\SetConfig(\OC::$server->getConfig())); |
|
| 92 | + $application->add(new OC\Core\Command\Config\Import(\OC::$server->getConfig())); |
|
| 93 | + $application->add(new OC\Core\Command\Config\ListConfigs(\OC::$server->getSystemConfig(), \OC::$server->getAppConfig())); |
|
| 94 | + $application->add(new OC\Core\Command\Config\System\DeleteConfig(\OC::$server->getSystemConfig())); |
|
| 95 | + $application->add(new OC\Core\Command\Config\System\GetConfig(\OC::$server->getSystemConfig())); |
|
| 96 | + $application->add(new OC\Core\Command\Config\System\SetConfig(\OC::$server->getSystemConfig())); |
|
| 97 | + |
|
| 98 | + $application->add(new OC\Core\Command\Db\ConvertType(\OC::$server->getConfig(), new \OC\DB\ConnectionFactory(\OC::$server->getSystemConfig()))); |
|
| 99 | + $application->add(new OC\Core\Command\Db\ConvertMysqlToMB4(\OC::$server->getConfig(), \OC::$server->getDatabaseConnection(), \OC::$server->getURLGenerator(), \OC::$server->getLogger())); |
|
| 100 | + $application->add(new OC\Core\Command\Db\ConvertFilecacheBigInt(\OC::$server->getDatabaseConnection())); |
|
| 101 | + $application->add(new OC\Core\Command\Db\AddMissingIndices(\OC::$server->getDatabaseConnection(), \OC::$server->getEventDispatcher())); |
|
| 102 | + $application->add(new OC\Core\Command\Db\AddMissingColumns(\OC::$server->getDatabaseConnection(), \OC::$server->getEventDispatcher())); |
|
| 103 | + $application->add(new OC\Core\Command\Db\Migrations\StatusCommand(\OC::$server->getDatabaseConnection())); |
|
| 104 | + $application->add(new OC\Core\Command\Db\Migrations\MigrateCommand(\OC::$server->getDatabaseConnection())); |
|
| 105 | + $application->add(new OC\Core\Command\Db\Migrations\GenerateCommand(\OC::$server->getDatabaseConnection(), \OC::$server->getAppManager())); |
|
| 106 | + $application->add(new OC\Core\Command\Db\Migrations\GenerateFromSchemaFileCommand(\OC::$server->getConfig(), \OC::$server->getAppManager(), \OC::$server->getDatabaseConnection())); |
|
| 107 | + $application->add(new OC\Core\Command\Db\Migrations\ExecuteCommand(\OC::$server->getDatabaseConnection(), \OC::$server->getAppManager(), \OC::$server->getConfig())); |
|
| 108 | + |
|
| 109 | + $application->add(new OC\Core\Command\Encryption\Disable(\OC::$server->getConfig())); |
|
| 110 | + $application->add(new OC\Core\Command\Encryption\Enable(\OC::$server->getConfig(), \OC::$server->getEncryptionManager())); |
|
| 111 | + $application->add(new OC\Core\Command\Encryption\ListModules(\OC::$server->getEncryptionManager(), \OC::$server->getConfig())); |
|
| 112 | + $application->add(new OC\Core\Command\Encryption\SetDefaultModule(\OC::$server->getEncryptionManager(), \OC::$server->getConfig())); |
|
| 113 | + $application->add(new OC\Core\Command\Encryption\Status(\OC::$server->getEncryptionManager())); |
|
| 114 | + $application->add(new OC\Core\Command\Encryption\EncryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getAppManager(), \OC::$server->getConfig(), new \Symfony\Component\Console\Helper\QuestionHelper())); |
|
| 115 | + $application->add(new OC\Core\Command\Encryption\DecryptAll( |
|
| 116 | + \OC::$server->getEncryptionManager(), |
|
| 117 | + \OC::$server->getAppManager(), |
|
| 118 | + \OC::$server->getConfig(), |
|
| 119 | + new \OC\Encryption\DecryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getUserManager(), new \OC\Files\View()), |
|
| 120 | + new \Symfony\Component\Console\Helper\QuestionHelper()) |
|
| 121 | + ); |
|
| 122 | + |
|
| 123 | + $application->add(new OC\Core\Command\Log\Manage(\OC::$server->getConfig())); |
|
| 124 | + $application->add(new OC\Core\Command\Log\File(\OC::$server->getConfig())); |
|
| 125 | + |
|
| 126 | + $view = new \OC\Files\View(); |
|
| 127 | + $util = new \OC\Encryption\Util( |
|
| 128 | + $view, |
|
| 129 | + \OC::$server->getUserManager(), |
|
| 130 | + \OC::$server->getGroupManager(), |
|
| 131 | + \OC::$server->getConfig() |
|
| 132 | + ); |
|
| 133 | + $application->add(new OC\Core\Command\Encryption\ChangeKeyStorageRoot( |
|
| 134 | + $view, |
|
| 135 | + \OC::$server->getUserManager(), |
|
| 136 | + \OC::$server->getConfig(), |
|
| 137 | + $util, |
|
| 138 | + new \Symfony\Component\Console\Helper\QuestionHelper() |
|
| 139 | + ) |
|
| 140 | + ); |
|
| 141 | + $application->add(new OC\Core\Command\Encryption\ShowKeyStorageRoot($util)); |
|
| 142 | + |
|
| 143 | + $application->add(new OC\Core\Command\Maintenance\DataFingerprint(\OC::$server->getConfig(), new \OC\AppFramework\Utility\TimeFactory())); |
|
| 144 | + $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateDB(\OC::$server->getMimeTypeDetector(), \OC::$server->getMimeTypeLoader())); |
|
| 145 | + $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateJS(\OC::$server->getMimeTypeDetector())); |
|
| 146 | + $application->add(new OC\Core\Command\Maintenance\Mode(\OC::$server->getConfig())); |
|
| 147 | + $application->add(new OC\Core\Command\Maintenance\UpdateHtaccess()); |
|
| 148 | + $application->add(new OC\Core\Command\Maintenance\UpdateTheme(\OC::$server->getMimeTypeDetector(), \OC::$server->getMemCacheFactory())); |
|
| 149 | + |
|
| 150 | + $application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->getLogger(), \OC::$server->query(\OC\Installer::class))); |
|
| 151 | + $application->add(new OC\Core\Command\Maintenance\Repair( |
|
| 152 | + new \OC\Repair([], \OC::$server->getEventDispatcher()), |
|
| 153 | + \OC::$server->getConfig(), |
|
| 154 | + \OC::$server->getEventDispatcher(), |
|
| 155 | + \OC::$server->getAppManager() |
|
| 156 | + )); |
|
| 157 | + |
|
| 158 | + $application->add(\OC::$server->query(\OC\Core\Command\Preview\Repair::class)); |
|
| 159 | + |
|
| 160 | + $application->add(new OC\Core\Command\User\Add(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 161 | + $application->add(new OC\Core\Command\User\Delete(\OC::$server->getUserManager())); |
|
| 162 | + $application->add(new OC\Core\Command\User\Disable(\OC::$server->getUserManager())); |
|
| 163 | + $application->add(new OC\Core\Command\User\Enable(\OC::$server->getUserManager())); |
|
| 164 | + $application->add(new OC\Core\Command\User\LastSeen(\OC::$server->getUserManager())); |
|
| 165 | + $application->add(\OC::$server->get(\OC\Core\Command\User\Report::class)); |
|
| 166 | + $application->add(new OC\Core\Command\User\ResetPassword(\OC::$server->getUserManager())); |
|
| 167 | + $application->add(new OC\Core\Command\User\Setting(\OC::$server->getUserManager(), \OC::$server->getConfig(), \OC::$server->getDatabaseConnection())); |
|
| 168 | + $application->add(new OC\Core\Command\User\ListCommand(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 169 | + $application->add(new OC\Core\Command\User\Info(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 170 | + |
|
| 171 | + $application->add(new OC\Core\Command\Group\Add(\OC::$server->getGroupManager())); |
|
| 172 | + $application->add(new OC\Core\Command\Group\Delete(\OC::$server->getGroupManager())); |
|
| 173 | + $application->add(new OC\Core\Command\Group\ListCommand(\OC::$server->getGroupManager())); |
|
| 174 | + $application->add(new OC\Core\Command\Group\AddUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 175 | + $application->add(new OC\Core\Command\Group\RemoveUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 176 | + |
|
| 177 | + $application->add(new OC\Core\Command\Security\ListCertificates(\OC::$server->getCertificateManager(null), \OC::$server->getL10N('core'))); |
|
| 178 | + $application->add(new OC\Core\Command\Security\ImportCertificate(\OC::$server->getCertificateManager(null))); |
|
| 179 | + $application->add(new OC\Core\Command\Security\RemoveCertificate(\OC::$server->getCertificateManager(null))); |
|
| 180 | + $application->add(new OC\Core\Command\Security\ResetBruteforceAttempts(\OC::$server->getBruteForceThrottler())); |
|
| 181 | 181 | } else { |
| 182 | - $application->add(new OC\Core\Command\Maintenance\Install(\OC::$server->getSystemConfig())); |
|
| 182 | + $application->add(new OC\Core\Command\Maintenance\Install(\OC::$server->getSystemConfig())); |
|
| 183 | 183 | } |
@@ -35,64 +35,64 @@ |
||
| 35 | 35 | use Symfony\Component\Console\Output\OutputInterface; |
| 36 | 36 | |
| 37 | 37 | class Report extends Command { |
| 38 | - /** @var IUserManager */ |
|
| 39 | - protected $userManager; |
|
| 40 | - /** @var IConfig */ |
|
| 41 | - private $config; |
|
| 38 | + /** @var IUserManager */ |
|
| 39 | + protected $userManager; |
|
| 40 | + /** @var IConfig */ |
|
| 41 | + private $config; |
|
| 42 | 42 | |
| 43 | - /** |
|
| 44 | - * @param IUserManager $userManager |
|
| 45 | - */ |
|
| 46 | - public function __construct(IUserManager $userManager, IConfig $config) { |
|
| 47 | - $this->userManager = $userManager; |
|
| 48 | - $this->config = $config; |
|
| 49 | - parent::__construct(); |
|
| 50 | - } |
|
| 43 | + /** |
|
| 44 | + * @param IUserManager $userManager |
|
| 45 | + */ |
|
| 46 | + public function __construct(IUserManager $userManager, IConfig $config) { |
|
| 47 | + $this->userManager = $userManager; |
|
| 48 | + $this->config = $config; |
|
| 49 | + parent::__construct(); |
|
| 50 | + } |
|
| 51 | 51 | |
| 52 | - protected function configure() { |
|
| 53 | - $this |
|
| 54 | - ->setName('user:report') |
|
| 55 | - ->setDescription('shows how many users have access'); |
|
| 56 | - } |
|
| 52 | + protected function configure() { |
|
| 53 | + $this |
|
| 54 | + ->setName('user:report') |
|
| 55 | + ->setDescription('shows how many users have access'); |
|
| 56 | + } |
|
| 57 | 57 | |
| 58 | - protected function execute(InputInterface $input, OutputInterface $output): int { |
|
| 59 | - $table = new Table($output); |
|
| 60 | - $table->setHeaders(['User Report', '']); |
|
| 61 | - $userCountArray = $this->countUsers(); |
|
| 62 | - if (!empty($userCountArray)) { |
|
| 63 | - $total = 0; |
|
| 64 | - $rows = []; |
|
| 65 | - foreach ($userCountArray as $classname => $users) { |
|
| 66 | - $total += $users; |
|
| 67 | - $rows[] = [$classname, $users]; |
|
| 68 | - } |
|
| 58 | + protected function execute(InputInterface $input, OutputInterface $output): int { |
|
| 59 | + $table = new Table($output); |
|
| 60 | + $table->setHeaders(['User Report', '']); |
|
| 61 | + $userCountArray = $this->countUsers(); |
|
| 62 | + if (!empty($userCountArray)) { |
|
| 63 | + $total = 0; |
|
| 64 | + $rows = []; |
|
| 65 | + foreach ($userCountArray as $classname => $users) { |
|
| 66 | + $total += $users; |
|
| 67 | + $rows[] = [$classname, $users]; |
|
| 68 | + } |
|
| 69 | 69 | |
| 70 | - $rows[] = [' ']; |
|
| 71 | - $rows[] = ['total users', $total]; |
|
| 72 | - } else { |
|
| 73 | - $rows[] = ['No backend enabled that supports user counting', '']; |
|
| 74 | - } |
|
| 70 | + $rows[] = [' ']; |
|
| 71 | + $rows[] = ['total users', $total]; |
|
| 72 | + } else { |
|
| 73 | + $rows[] = ['No backend enabled that supports user counting', '']; |
|
| 74 | + } |
|
| 75 | 75 | |
| 76 | - $userDirectoryCount = $this->countUserDirectories(); |
|
| 77 | - $rows[] = [' ']; |
|
| 78 | - $rows[] = ['user directories', $userDirectoryCount]; |
|
| 76 | + $userDirectoryCount = $this->countUserDirectories(); |
|
| 77 | + $rows[] = [' ']; |
|
| 78 | + $rows[] = ['user directories', $userDirectoryCount]; |
|
| 79 | 79 | |
| 80 | - $disabledUsers = $this->config->getUsersForUserValue('core', 'enabled', 'false'); |
|
| 81 | - $disabledUsersCount = count($disabledUsers); |
|
| 82 | - $rows[] = ['disabled users', $disabledUsersCount]; |
|
| 80 | + $disabledUsers = $this->config->getUsersForUserValue('core', 'enabled', 'false'); |
|
| 81 | + $disabledUsersCount = count($disabledUsers); |
|
| 82 | + $rows[] = ['disabled users', $disabledUsersCount]; |
|
| 83 | 83 | |
| 84 | - $table->setRows($rows); |
|
| 85 | - $table->render(); |
|
| 86 | - return 0; |
|
| 87 | - } |
|
| 84 | + $table->setRows($rows); |
|
| 85 | + $table->render(); |
|
| 86 | + return 0; |
|
| 87 | + } |
|
| 88 | 88 | |
| 89 | - private function countUsers() { |
|
| 90 | - return $this->userManager->countUsers(); |
|
| 91 | - } |
|
| 89 | + private function countUsers() { |
|
| 90 | + return $this->userManager->countUsers(); |
|
| 91 | + } |
|
| 92 | 92 | |
| 93 | - private function countUserDirectories() { |
|
| 94 | - $dataview = new \OC\Files\View('/'); |
|
| 95 | - $userDirectories = $dataview->getDirectoryContent('/', 'httpd/unix-directory'); |
|
| 96 | - return count($userDirectories); |
|
| 97 | - } |
|
| 93 | + private function countUserDirectories() { |
|
| 94 | + $dataview = new \OC\Files\View('/'); |
|
| 95 | + $userDirectories = $dataview->getDirectoryContent('/', 'httpd/unix-directory'); |
|
| 96 | + return count($userDirectories); |
|
| 97 | + } |
|
| 98 | 98 | } |