You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

register_command.php 9.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * @copyright Copyright (c) 2016, ownCloud, Inc.
  5. *
  6. * @author Bart Visscher <bartv@thisnet.nl>
  7. * @author Björn Schießle <bjoern@schiessle.org>
  8. * @author Christian Kampka <christian@kampka.net>
  9. * @author Christoph Wurst <christoph@winzerhof-wurst.at>
  10. * @author Côme Chilliet <come.chilliet@nextcloud.com>
  11. * @author Daniel Calviño Sánchez <danxuliu@gmail.com>
  12. * @author Daniel Kesselberg <mail@danielkesselberg.de>
  13. * @author Denis Mosolov <denismosolov@gmail.com>
  14. * @author Joas Schilling <coding@schilljs.com>
  15. * @author Johannes Leuker <j.leuker@hosting.de>
  16. * @author Johannes Riedel <joeried@users.noreply.github.com>
  17. * @author John Molakvoæ <skjnldsv@protonmail.com>
  18. * @author Jörn Friedrich Dreyer <jfd@butonic.de>
  19. * @author Julius Härtl <jus@bitgrid.net>
  20. * @author Lukas Reschke <lukas@statuscode.ch>
  21. * @author Maxence Lange <maxence@artificial-owl.com>
  22. * @author michag86 <micha_g@arcor.de>
  23. * @author Morris Jobke <hey@morrisjobke.de>
  24. * @author Patrik Kernstock <info@pkern.at>
  25. * @author Robin Appelman <robin@icewind.nl>
  26. * @author Robin McCorkell <robin@mccorkell.me.uk>
  27. * @author Roeland Jago Douma <roeland@famdouma.nl>
  28. * @author Ruben Homs <ruben@homs.codes>
  29. * @author Sean Molenaar <sean@seanmolenaar.eu>
  30. * @author sualko <klaus@jsxc.org>
  31. * @author Thomas Müller <thomas.mueller@tmit.eu>
  32. * @author Thomas Pulzer <t.pulzer@kniel.de>
  33. * @author Victor Dubiniuk <dubiniuk@owncloud.com>
  34. * @author Vincent Petry <vincent@nextcloud.com>
  35. *
  36. * @license AGPL-3.0
  37. *
  38. * This code is free software: you can redistribute it and/or modify
  39. * it under the terms of the GNU Affero General Public License, version 3,
  40. * as published by the Free Software Foundation.
  41. *
  42. * This program is distributed in the hope that it will be useful,
  43. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  44. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  45. * GNU Affero General Public License for more details.
  46. *
  47. * You should have received a copy of the GNU Affero General Public License, version 3,
  48. * along with this program. If not, see <http://www.gnu.org/licenses/>
  49. *
  50. */
  51. use OC\Core\Command;
  52. use OCP\IConfig;
  53. use OCP\Server;
  54. use Stecman\Component\Symfony\Console\BashCompletion\CompletionCommand;
  55. $application->add(new CompletionCommand());
  56. $application->add(Server::get(Command\Status::class));
  57. $application->add(Server::get(Command\Check::class));
  58. $application->add(Server::get(Command\L10n\CreateJs::class));
  59. $application->add(Server::get(Command\Integrity\SignApp::class));
  60. $application->add(Server::get(Command\Integrity\SignCore::class));
  61. $application->add(Server::get(Command\Integrity\CheckApp::class));
  62. $application->add(Server::get(Command\Integrity\CheckCore::class));
  63. $config = Server::get(IConfig::class);
  64. if ($config->getSystemValueBool('installed', false)) {
  65. $application->add(Server::get(Command\App\Disable::class));
  66. $application->add(Server::get(Command\App\Enable::class));
  67. $application->add(Server::get(Command\App\Install::class));
  68. $application->add(Server::get(Command\App\GetPath::class));
  69. $application->add(Server::get(Command\App\ListApps::class));
  70. $application->add(Server::get(Command\App\Remove::class));
  71. $application->add(Server::get(Command\App\Update::class));
  72. $application->add(Server::get(Command\TwoFactorAuth\Cleanup::class));
  73. $application->add(Server::get(Command\TwoFactorAuth\Enforce::class));
  74. $application->add(Server::get(Command\TwoFactorAuth\Enable::class));
  75. $application->add(Server::get(Command\TwoFactorAuth\Disable::class));
  76. $application->add(Server::get(Command\TwoFactorAuth\State::class));
  77. $application->add(Server::get(Command\Background\Cron::class));
  78. $application->add(Server::get(Command\Background\WebCron::class));
  79. $application->add(Server::get(Command\Background\Ajax::class));
  80. $application->add(Server::get(Command\Background\Job::class));
  81. $application->add(Server::get(Command\Background\ListCommand::class));
  82. $application->add(Server::get(Command\Background\Delete::class));
  83. $application->add(Server::get(Command\Broadcast\Test::class));
  84. $application->add(Server::get(Command\Config\App\DeleteConfig::class));
  85. $application->add(Server::get(Command\Config\App\GetConfig::class));
  86. $application->add(Server::get(Command\Config\App\SetConfig::class));
  87. $application->add(Server::get(Command\Config\Import::class));
  88. $application->add(Server::get(Command\Config\ListConfigs::class));
  89. $application->add(Server::get(Command\Config\System\DeleteConfig::class));
  90. $application->add(Server::get(Command\Config\System\GetConfig::class));
  91. $application->add(Server::get(Command\Config\System\SetConfig::class));
  92. $application->add(Server::get(Command\Info\File::class));
  93. $application->add(Server::get(Command\Info\Space::class));
  94. $application->add(Server::get(Command\Db\ConvertType::class));
  95. $application->add(Server::get(Command\Db\ConvertMysqlToMB4::class));
  96. $application->add(Server::get(Command\Db\ConvertFilecacheBigInt::class));
  97. $application->add(Server::get(Command\Db\AddMissingColumns::class));
  98. $application->add(Server::get(Command\Db\AddMissingIndices::class));
  99. $application->add(Server::get(Command\Db\AddMissingPrimaryKeys::class));
  100. if ($config->getSystemValueBool('debug', false)) {
  101. $application->add(Server::get(Command\Db\Migrations\StatusCommand::class));
  102. $application->add(Server::get(Command\Db\Migrations\MigrateCommand::class));
  103. $application->add(Server::get(Command\Db\Migrations\GenerateCommand::class));
  104. $application->add(Server::get(Command\Db\Migrations\ExecuteCommand::class));
  105. }
  106. $application->add(Server::get(Command\Encryption\Disable::class));
  107. $application->add(Server::get(Command\Encryption\Enable::class));
  108. $application->add(Server::get(Command\Encryption\ListModules::class));
  109. $application->add(Server::get(Command\Encryption\SetDefaultModule::class));
  110. $application->add(Server::get(Command\Encryption\Status::class));
  111. $application->add(Server::get(Command\Encryption\EncryptAll::class));
  112. $application->add(Server::get(Command\Encryption\DecryptAll::class));
  113. $application->add(Server::get(Command\Log\Manage::class));
  114. $application->add(Server::get(Command\Log\File::class));
  115. $application->add(Server::get(Command\Encryption\ChangeKeyStorageRoot::class));
  116. $application->add(Server::get(Command\Encryption\ShowKeyStorageRoot::class));
  117. $application->add(Server::get(Command\Encryption\MigrateKeyStorage::class));
  118. $application->add(Server::get(Command\Maintenance\DataFingerprint::class));
  119. $application->add(Server::get(Command\Maintenance\Mimetype\UpdateDB::class));
  120. $application->add(Server::get(Command\Maintenance\Mimetype\UpdateJS::class));
  121. $application->add(Server::get(Command\Maintenance\Mode::class));
  122. $application->add(Server::get(Command\Maintenance\UpdateHtaccess::class));
  123. $application->add(Server::get(Command\Maintenance\UpdateTheme::class));
  124. $application->add(Server::get(Command\Upgrade::class));
  125. $application->add(Server::get(Command\Maintenance\Repair::class));
  126. $application->add(Server::get(Command\Maintenance\RepairShareOwnership::class));
  127. $application->add(Server::get(Command\Preview\Generate::class));
  128. $application->add(Server::get(Command\Preview\Repair::class));
  129. $application->add(Server::get(Command\Preview\ResetRenderedTexts::class));
  130. $application->add(Server::get(Command\User\Add::class));
  131. $application->add(Server::get(Command\User\Delete::class));
  132. $application->add(Server::get(Command\User\Disable::class));
  133. $application->add(Server::get(Command\User\Enable::class));
  134. $application->add(Server::get(Command\User\LastSeen::class));
  135. $application->add(Server::get(Command\User\Report::class));
  136. $application->add(Server::get(Command\User\ResetPassword::class));
  137. $application->add(Server::get(Command\User\Setting::class));
  138. $application->add(Server::get(Command\User\ListCommand::class));
  139. $application->add(Server::get(Command\User\ClearGeneratedAvatarCacheCommand::class));
  140. $application->add(Server::get(Command\User\Info::class));
  141. $application->add(Server::get(Command\User\SyncAccountDataCommand::class));
  142. $application->add(Server::get(Command\User\AuthTokens\Add::class));
  143. $application->add(Server::get(Command\User\AuthTokens\ListCommand::class));
  144. $application->add(Server::get(Command\User\AuthTokens\Delete::class));
  145. $application->add(Server::get(Command\User\Keys\Verify::class));
  146. $application->add(Server::get(Command\Group\Add::class));
  147. $application->add(Server::get(Command\Group\Delete::class));
  148. $application->add(Server::get(Command\Group\ListCommand::class));
  149. $application->add(Server::get(Command\Group\AddUser::class));
  150. $application->add(Server::get(Command\Group\RemoveUser::class));
  151. $application->add(Server::get(Command\Group\Info::class));
  152. $application->add(Server::get(Command\SystemTag\ListCommand::class));
  153. $application->add(Server::get(Command\SystemTag\Delete::class));
  154. $application->add(Server::get(Command\SystemTag\Add::class));
  155. $application->add(Server::get(Command\SystemTag\Edit::class));
  156. $application->add(Server::get(Command\Security\ListCertificates::class));
  157. $application->add(Server::get(Command\Security\ImportCertificate::class));
  158. $application->add(Server::get(Command\Security\RemoveCertificate::class));
  159. $application->add(Server::get(Command\Security\BruteforceAttempts::class));
  160. $application->add(Server::get(Command\Security\BruteforceResetAttempts::class));
  161. $application->add(Server::get(Command\SetupChecks::class));
  162. $application->add(Server::get(Command\FilesMetadata\Get::class));
  163. } else {
  164. $application->add(Server::get(Command\Maintenance\Install::class));
  165. }