mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
change command to user:applications
This commit is contained in:
@@ -31,7 +31,7 @@ use Alchemy\Phrasea\Command\Compile\Configuration;
|
||||
use Alchemy\Phrasea\Command\RecordAdd;
|
||||
use Alchemy\Phrasea\Command\RescanTechnicalDatas;
|
||||
use Alchemy\Phrasea\CLI;
|
||||
use Alchemy\Phrasea\Command\Application\ApplicationAppCommand;
|
||||
use Alchemy\Phrasea\Command\User\UserApplicationsCommand;
|
||||
use Alchemy\Phrasea\Command\Plugin\AddPlugin;
|
||||
use Alchemy\Phrasea\Command\Plugin\RemovePlugin;
|
||||
use Alchemy\Phrasea\Command\CheckConfig;
|
||||
@@ -113,7 +113,7 @@ $cli->command(new \module_console_fieldsDelete('fields:delete'));
|
||||
$cli->command(new \module_console_fieldsRename('fields:rename'));
|
||||
$cli->command(new \module_console_fieldsMerge('fields:merge'));
|
||||
|
||||
$cli->command(new ApplicationAppCommand('application:app'));
|
||||
$cli->command(new UserApplicationsCommand('user:applications'));
|
||||
|
||||
$cli->command(new CreateCollection('collection:create'));
|
||||
$cli->command(new ListCollectionCommand('collection:list'));
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Alchemy\Phrasea\Command\Application;
|
||||
namespace Alchemy\Phrasea\Command\User;
|
||||
|
||||
use Alchemy\Phrasea\Command\Command;
|
||||
use Alchemy\Phrasea\Core\LazyLocator;
|
||||
@@ -24,7 +24,7 @@ use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
|
||||
|
||||
class ApplicationAppCommand extends Command
|
||||
class UserApplicationsCommand extends Command
|
||||
{
|
||||
|
||||
/**
|
||||
@@ -32,7 +32,7 @@ class ApplicationAppCommand extends Command
|
||||
*/
|
||||
public function __construct($name = null)
|
||||
{
|
||||
parent::__construct('application:app');
|
||||
parent::__construct('user:applications');
|
||||
|
||||
$this->setDescription('List, Create, Edit, Delete application in Phraseanet <comment>(experimental)</>')
|
||||
->addOption('user_id', 'u', InputOption::VALUE_REQUIRED, 'The id of user.')
|
||||
@@ -129,6 +129,11 @@ class ApplicationAppCommand extends Command
|
||||
}
|
||||
}
|
||||
|
||||
if ($webhookUrl) {
|
||||
$applicationManipulator->setWebhookUrl($application, $webhookUrl);
|
||||
$applicationManipulator->update($application);
|
||||
}
|
||||
|
||||
$this->showApllicationInformation($apiOauthRepository, $account, $application, $jsonformat, $output);
|
||||
} catch (\Exception $e) {
|
||||
$output->writeln('<error>Create an application for user failed : '.$e->getMessage().'</error>');
|
Reference in New Issue
Block a user