* * @author Arthur Schiwon * @author Joas Schilling * * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . * */ namespace OCA\WorkflowEngine\Command; use OCA\WorkflowEngine\Helper\ScopeContext; use OCA\WorkflowEngine\Manager; use OCP\WorkflowEngine\IManager; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; class Index extends Command { /** @var Manager */ private $manager; public function __construct(Manager $manager) { $this->manager = $manager; parent::__construct(); } protected function configure() { $this ->setName('workflows:list') ->setDescription('Lists configured workflows') ->addArgument( 'scope', InputArgument::OPTIONAL, 'Lists workflows for "admin", "user"', 'admin' ) ->addArgument( 'scopeId', InputArgument::OPTIONAL, 'User IDs when the scope is "user"', null ); } protected function mappedScope(string $scope): int { static $scopes = [ 'admin' => IManager::SCOPE_ADMIN, 'user' => IManager::SCOPE_USER, ]; return $scopes[$scope] ?? -1; } protected function execute(InputInterface $input, OutputInterface $output): int { $ops = $this->manager->getAllOperations( new ScopeContext( $this->mappedScope($input->getArgument('scope')), $input->getArgument('scopeId') ) ); $output->writeln(\json_encode($ops)); return 0; } } rbinet-replace-remove-wording-with-delete Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
aboutsummaryrefslogtreecommitdiffstats
blob: 615424a42924fef736318a8b451b6d9cf2617f4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
SPDX-License-Identifier: MIT
SPDX-License-Identifier: ISC
SPDX-License-Identifier: GPL-3.0-or-later
SPDX-License-Identifier: AGPL-3.0-or-later
SPDX-License-Identifier: (MPL-2.0 OR Apache-2.0)
SPDX-FileCopyrightText: escape-html developers
SPDX-FileCopyrightText: Tobias Koppers @sokra
SPDX-FileCopyrightText: Roman Shtylman <shtylman@gmail.com>
SPDX-FileCopyrightText: OpenJS Foundation and other contributors
SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
SPDX-FileCopyrightText: Morris Jobke
SPDX-FileCopyrightText: GitHub Inc.
SPDX-FileCopyrightText: Dr.-Ing. Mario Heiderich, Cure53 <mario@cure53.de> (https://cure53.de/)
SPDX-FileCopyrightText: Christoph Wurst


This file is generated from multiple sources. Included packages:
- semver
	- version: 7.6.3
	- license: ISC
- @nextcloud/event-bus
	- version: 3.3.1
	- license: GPL-3.0-or-later
- @nextcloud/l10n
	- version: 3.1.0
	- license: GPL-3.0-or-later
- @nextcloud/router
	- version: 3.0.1
	- license: GPL-3.0-or-later
- css-loader
	- version: 7.1.2
	- license: MIT
- dompurify
	- version: 3.1.7
	- license: (MPL-2.0 OR Apache-2.0)
- escape-html
	- version: 1.0.3
	- license: MIT
- jquery-ui
	- version: 1.14.1
	- license: MIT
- jquery
	- version: 3.7.1
	- license: MIT
- process
	- version: 0.11.10
	- license: MIT
- strengthify
	- version: 0.5.9
	- license: MIT
- style-loader
	- version: 4.0.0
	- license: MIT
- webpack
	- version: 5.94.0
	- license: MIT
- nextcloud
	- version: 1.0.0
	- license: AGPL-3.0-or-later