diff options
-rw-r--r-- | core/Command/User/AuthTokens/Add.php (renamed from core/Command/User/AddAppPassword.php) | 7 | ||||
-rw-r--r-- | core/Command/User/AuthTokens/Delete.php (renamed from core/Command/User/DeleteAuthToken.php) | 6 | ||||
-rw-r--r-- | core/Command/User/AuthTokens/ListCommand.php (renamed from core/Command/User/AuthTokens.php) | 6 | ||||
-rw-r--r-- | core/register_command.php | 6 |
4 files changed, 13 insertions, 12 deletions
diff --git a/core/Command/User/AddAppPassword.php b/core/Command/User/AuthTokens/Add.php index 8c506c8510e..e067c069c79 100644 --- a/core/Command/User/AddAppPassword.php +++ b/core/Command/User/AuthTokens/Add.php @@ -24,7 +24,7 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -namespace OC\Core\Command\User; +namespace OC\Core\Command\User\AuthTokens; use OC\Authentication\Events\AppPasswordCreatedEvent; use OC\Authentication\Token\IProvider; @@ -40,7 +40,7 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Question\Question; -class AddAppPassword extends Command { +class Add extends Command { public function __construct( protected IUserManager $userManager, protected IProvider $tokenProvider, @@ -52,7 +52,8 @@ class AddAppPassword extends Command { protected function configure() { $this - ->setName('user:add-app-password') + ->setName('user:auth-tokens:add') + ->setAliases(['user:add-app-password']) ->setDescription('Add app password for the named user') ->addArgument( 'user', diff --git a/core/Command/User/DeleteAuthToken.php b/core/Command/User/AuthTokens/Delete.php index 13b63242b79..928387f1cc6 100644 --- a/core/Command/User/DeleteAuthToken.php +++ b/core/Command/User/AuthTokens/Delete.php @@ -20,7 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -namespace OC\Core\Command\User; +namespace OC\Core\Command\User\AuthTokens; use OC\Core\Command\Base; use OC\Authentication\Token\IProvider; @@ -28,7 +28,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -class DeleteAuthToken extends Base { +class Delete extends Base { public function __construct( protected IProvider $tokenProvider, ) { @@ -37,7 +37,7 @@ class DeleteAuthToken extends Base { protected function configure(): void { $this - ->setName('user:delete-auth-token') + ->setName('user:auth-tokens:delete') ->setDescription('Deletes an authentication token') ->addArgument( 'id', diff --git a/core/Command/User/AuthTokens.php b/core/Command/User/AuthTokens/ListCommand.php index 43fa687781e..6739e8b4648 100644 --- a/core/Command/User/AuthTokens.php +++ b/core/Command/User/AuthTokens/ListCommand.php @@ -20,7 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -namespace OC\Core\Command\User; +namespace OC\Core\Command\User\AuthTokens; use OC\Core\Command\Base; use OC\Authentication\Token\IProvider; @@ -30,7 +30,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -class AuthTokens extends Base { +class ListCommand extends Base { public function __construct( protected IUserManager $userManager, protected IProvider $tokenProvider, @@ -42,7 +42,7 @@ class AuthTokens extends Base { parent::configure(); $this - ->setName('user:auth-tokens') + ->setName('user:auth-tokens:list') ->setDescription('List authentication tokens of an user') ->addArgument( 'user', diff --git a/core/register_command.php b/core/register_command.php index f6ffe231c8f..2da8e2aa186 100644 --- a/core/register_command.php +++ b/core/register_command.php @@ -192,9 +192,9 @@ if (\OC::$server->getConfig()->getSystemValue('installed', false)) { $application->add(new OC\Core\Command\User\Setting(\OC::$server->getUserManager(), \OC::$server->getConfig())); $application->add(new OC\Core\Command\User\ListCommand(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); $application->add(new OC\Core\Command\User\Info(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); - $application->add(new OC\Core\Command\User\AddAppPassword(\OC::$server->get(\OCP\IUserManager::class), \OC::$server->get(\OC\Authentication\Token\IProvider::class), \OC::$server->get(\OCP\Security\ISecureRandom::class), \OC::$server->get(\OCP\EventDispatcher\IEventDispatcher::class))); - $application->add(\OC::$server->get(\OC\Core\Command\User\AuthTokens::class)); - $application->add(\OC::$server->get(\OC\Core\Command\User\DeleteAuthToken::class)); + $application->add(\OC::$server->get(\OC\Core\Command\User\AuthTokens\Add::class)); + $application->add(\OC::$server->get(\OC\Core\Command\User\AuthTokens\ListCommand::class)); + $application->add(\OC::$server->get(\OC\Core\Command\User\AuthTokens\Delete::class)); $application->add(new OC\Core\Command\Group\Add(\OC::$server->getGroupManager())); $application->add(new OC\Core\Command\Group\Delete(\OC::$server->getGroupManager())); |