diff options
author | Joas Schilling <coding@schilljs.com> | 2019-09-20 11:33:02 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2019-09-27 14:29:56 +0200 |
commit | 653628c8fb69dc3f9d26751520f91e43a18f17ae (patch) | |
tree | ef2dfb5f01bc19e09386364895ec9c8620ec3257 /core/Command | |
parent | 45506adc5c2a34a8c812a2a3c9273a8447b450af (diff) | |
download | nextcloud-server-653628c8fb69dc3f9d26751520f91e43a18f17ae.tar.gz nextcloud-server-653628c8fb69dc3f9d26751520f91e43a18f17ae.zip |
Allow to set the group display name in the database backend
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core/Command')
-rw-r--r-- | core/Command/Group/Add.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/core/Command/Group/Add.php b/core/Command/Group/Add.php index 61253cf163d..eb2ecd0c533 100644 --- a/core/Command/Group/Add.php +++ b/core/Command/Group/Add.php @@ -28,6 +28,7 @@ use OC\Core\Command\Base; use OCP\IGroupManager; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; class Add extends Base { @@ -49,7 +50,13 @@ class Add extends Base { ->addArgument( 'groupid', InputArgument::REQUIRED, - 'Group name' + 'Group id' + ) + ->addOption( + 'display-name', + null, + InputOption::VALUE_REQUIRED, + 'Group name used in the web UI (can contain any characters)' ); } @@ -62,6 +69,10 @@ class Add extends Base { } else { $group = $this->groupManager->createGroup($gid); $output->writeln('Created group "' . $group->getGID() . '"'); + + if ($input->hasOption('display-name')) { + $group->setDisplayName($input->getOption('display-name')); + } } } } |