diff --git a/lib/Alchemy/Phrasea/Command/User/UserApplicationsCommand.php b/lib/Alchemy/Phrasea/Command/User/UserApplicationsCommand.php index d51065dbc6..0f7b3fb8fc 100644 --- a/lib/Alchemy/Phrasea/Command/User/UserApplicationsCommand.php +++ b/lib/Alchemy/Phrasea/Command/User/UserApplicationsCommand.php @@ -12,6 +12,7 @@ namespace Alchemy\Phrasea\Command\User; use Alchemy\Phrasea\Command\Command; +use Symfony\Component\Console\Helper\DialogHelper; use Alchemy\Phrasea\ControllerProvider\Api\V2; use Alchemy\Phrasea\Core\LazyLocator; use Alchemy\Phrasea\Model\Entities\ApiApplication; @@ -278,6 +279,19 @@ class UserApplicationsCommand extends Command $application = $apiApllicationConverter->convert($appId); + if (is_null($application->getCreator())) { + /** @var DialogHelper $dialog */ + $dialog = $this->getHelperSet()->get('dialog'); + + $continue = $dialog->askConfirmation($output, "It's a special phraseanet application, do you want really to delete it? (N/y)", false); + + if (!$continue) { + $output->writeln("See you later !"); + + return 0; + } + } + $applicationManipulator->delete($application); $output->writeln("Application ID $appId deleted successfully !");