diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-10-29 12:22:15 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-12-02 15:28:47 +0100 |
commit | 5274c5426818270460ce05ee0071aa9f189281e6 (patch) | |
tree | 5686820b9f0493ddc2a7005c39eee648849b9d79 /apps/files/lib/AppInfo | |
parent | b99134d0a37269b263eef019d1a58317b1d943ed (diff) | |
download | nextcloud-server-5274c5426818270460ce05ee0071aa9f189281e6.tar.gz nextcloud-server-5274c5426818270460ce05ee0071aa9f189281e6.zip |
Add a transfer ownership background job
This job can be initiated by a user to transfer a file/folder to a
target user.
The target user will have to accept the job.
Once that is done the transfers is initiated in the background.
Both parties get notified when the job is done.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files/lib/AppInfo')
-rw-r--r-- | apps/files/lib/AppInfo/Application.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/files/lib/AppInfo/Application.php b/apps/files/lib/AppInfo/Application.php index 1ffd5e96471..f4897d08e54 100644 --- a/apps/files/lib/AppInfo/Application.php +++ b/apps/files/lib/AppInfo/Application.php @@ -35,6 +35,7 @@ use OCA\Files\Controller\ApiController; use OCA\Files\Controller\ViewController; use OCA\Files\Event\LoadAdditionalScriptsEvent; use OCA\Files\Listener\LegacyLoadAdditionalScriptsAdapter; +use OCA\Files\Notification\Notifier; use OCA\Files\Service\TagService; use OCP\AppFramework\App; use OCP\Collaboration\Resources\IManager; @@ -42,8 +43,11 @@ use OCP\EventDispatcher\IEventDispatcher; use OCP\IContainer; class Application extends App { + + public const APP_ID = 'files'; + public function __construct(array $urlParams=array()) { - parent::__construct('files', $urlParams); + parent::__construct(self::APP_ID, $urlParams); $container = $this->getContainer(); $server = $container->getServer(); @@ -71,7 +75,7 @@ class Application extends App { return new TagService( $c->query('ServerContainer')->getUserSession(), $c->query('ServerContainer')->getActivityManager(), - $c->query('ServerContainer')->getTagManager()->load('files'), + $c->query('ServerContainer')->getTagManager()->load(self::APP_ID), $homeFolder, $server->getEventDispatcher() ); @@ -93,5 +97,9 @@ class Application extends App { /** @var IEventDispatcher $dispatcher */ $dispatcher = $container->query(IEventDispatcher::class); $dispatcher->addServiceListener(LoadAdditionalScriptsEvent::class, LegacyLoadAdditionalScriptsAdapter::class); + + /** @var \OCP\Notification\IManager $notifications */ + $notifications = $container->query(\OCP\Notification\IManager::class); + $notifications->registerNotifierService(Notifier::class); } } |