diff options
Diffstat (limited to 'apps/workflowengine/lib/Manager.php')
-rw-r--r-- | apps/workflowengine/lib/Manager.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/workflowengine/lib/Manager.php b/apps/workflowengine/lib/Manager.php index 1829bee300f..fbcf3a48493 100644 --- a/apps/workflowengine/lib/Manager.php +++ b/apps/workflowengine/lib/Manager.php @@ -23,6 +23,7 @@ namespace OCA\WorkflowEngine; use Doctrine\DBAL\DBALException; use OC\Cache\CappedMemoryCache; +use OCA\WorkflowEngine\AppInfo\Application; use OCA\WorkflowEngine\Check\FileMimeType; use OCA\WorkflowEngine\Check\FileName; use OCA\WorkflowEngine\Check\FileSize; @@ -40,6 +41,7 @@ use OCP\AppFramework\QueryException; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\Storage\IStorage; +use OCP\IConfig; use OCP\IDBConnection; use OCP\IL10N; use OCP\ILogger; @@ -108,6 +110,9 @@ class Manager implements IManager { /** @var IEventDispatcher */ private $dispatcher; + /** @var IConfig */ + private $config; + public function __construct( IDBConnection $connection, IServerContainer $container, @@ -115,7 +120,8 @@ class Manager implements IManager { LegacyDispatcher $eventDispatcher, ILogger $logger, IUserSession $session, - IEventDispatcher $dispatcher + IEventDispatcher $dispatcher, + IConfig $config ) { $this->connection = $connection; $this->container = $container; @@ -125,6 +131,7 @@ class Manager implements IManager { $this->operationsByScope = new CappedMemoryCache(64); $this->session = $session; $this->dispatcher = $dispatcher; + $this->config = $config; } public function getRuleMatcher(): IRuleMatcher { @@ -708,4 +715,8 @@ class Manager implements IManager { return []; } } + + public function isUserScopeEnabled(): bool { + return $this->config->getAppValue(Application::APP_ID, 'user_scope_disabled', 'no') === 'no'; + } } |