diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-09-11 13:14:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-11 13:14:06 +0200 |
commit | 2187f856ce4eadeee88bd8b9ff47719df52ea025 (patch) | |
tree | 9df95fb0db015c0f597237c105ee7c5838396a97 /lib/public/WorkflowEngine/ICheck.php | |
parent | 0cc780ec0a94e6ea2103ee667b111cc38fe81f12 (diff) | |
parent | 228cb240bcfe18410a2ce53a35531cdba98b014d (diff) | |
download | nextcloud-server-2187f856ce4eadeee88bd8b9ff47719df52ea025.tar.gz nextcloud-server-2187f856ce4eadeee88bd8b9ff47719df52ea025.zip |
Merge pull request #16682 from nextcloud/enh/12790/workflow-backend
workflow overhaul
Diffstat (limited to 'lib/public/WorkflowEngine/ICheck.php')
-rw-r--r-- | lib/public/WorkflowEngine/ICheck.php | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/lib/public/WorkflowEngine/ICheck.php b/lib/public/WorkflowEngine/ICheck.php index 1d4fc966460..f5586e83d51 100644 --- a/lib/public/WorkflowEngine/ICheck.php +++ b/lib/public/WorkflowEngine/ICheck.php @@ -2,6 +2,7 @@ /** * @copyright Copyright (c) 2016 Morris Jobke <hey@morrisjobke.de> * + * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Morris Jobke <hey@morrisjobke.de> * * @license GNU AGPL version 3 or any later version @@ -23,9 +24,6 @@ namespace OCP\WorkflowEngine; - -use OCP\Files\Storage\IStorage; - /** * Interface ICheck * @@ -34,13 +32,6 @@ use OCP\Files\Storage\IStorage; */ interface ICheck { /** - * @param IStorage $storage - * @param string $path - * @since 9.1 - */ - public function setFileInfo(IStorage $storage, $path); - - /** * @param string $operator * @param string $value * @return bool @@ -55,4 +46,28 @@ interface ICheck { * @since 9.1 */ public function validateCheck($operator, $value); + + /** + * returns a list of Entities the checker supports. The values must match + * the class name of the entity. + * + * An empty result means the check is universally available. + * + * @since 18.0.0 + */ + public function supportedEntities(): array; + + /** + * returns whether the operation can be used in the requested scope. + * + * Scope IDs are defined as constants in OCP\WorkflowEngine\IManager. At + * time of writing these are SCOPE_ADMIN and SCOPE_USER. + * + * For possibly unknown future scopes the recommended behaviour is: if + * user scope is permitted, the default behaviour should return `true`, + * otherwise `false`. + * + * @since 18.0.0 + */ + public function isAvailableForScope(int $scope): bool; } |