aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workflowengine/lib/Check/AbstractStringCheck.php
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2019-09-05 15:52:11 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2019-09-09 22:56:04 +0200
commitc2a52813e2cfadc43b096927ee9d9db3d9ac5c84 (patch)
treefffa2234b146bd5fbda576ad1a73b7b01575de4f /apps/workflowengine/lib/Check/AbstractStringCheck.php
parentd2c8b939d58239a99163445b83d80873932a5514 (diff)
downloadnextcloud-server-c2a52813e2cfadc43b096927ee9d9db3d9ac5c84.tar.gz
nextcloud-server-c2a52813e2cfadc43b096927ee9d9db3d9ac5c84.zip
extends ICheck with scope and entity support, provide them as initialState
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/workflowengine/lib/Check/AbstractStringCheck.php')
-rw-r--r--apps/workflowengine/lib/Check/AbstractStringCheck.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/workflowengine/lib/Check/AbstractStringCheck.php b/apps/workflowengine/lib/Check/AbstractStringCheck.php
index 0fd728e3496..7a385729e09 100644
--- a/apps/workflowengine/lib/Check/AbstractStringCheck.php
+++ b/apps/workflowengine/lib/Check/AbstractStringCheck.php
@@ -25,6 +25,7 @@ namespace OCA\WorkflowEngine\Check;
use OCP\Files\Storage\IStorage;
use OCP\IL10N;
use OCP\WorkflowEngine\ICheck;
+use OCP\WorkflowEngine\IManager;
abstract class AbstractStringCheck implements ICheck {
@@ -101,6 +102,16 @@ abstract class AbstractStringCheck implements ICheck {
}
}
+ public function supportedEntities(): array {
+ // universal by default
+ return [];
+ }
+
+ public function isAvailableForScope(int $scope): bool {
+ // admin only by default
+ return $scope === IManager::SCOPE_ADMIN;
+ }
+
/**
* @param string $pattern
* @param string $subject