aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/AppInfo/Application.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-12-12 21:45:59 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-12-17 10:49:29 +0100
commite7dc91002f87385547528f8ac507b037c0f6be93 (patch)
treea8605f6bd53ea44817daa1f343f45debcb89ff08 /apps/files_sharing/lib/AppInfo/Application.php
parent76895b6945f64b25d56a55c70585c441743eb226 (diff)
downloadnextcloud-server-e7dc91002f87385547528f8ac507b037c0f6be93.tar.gz
nextcloud-server-e7dc91002f87385547528f8ac507b037c0f6be93.zip
Allow users to specify to accept (internal) shares by default
Fixes #18255 A new user setting allows a user to always accept (internal) shares. For example if they don't like accepting shares manually ;) Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_sharing/lib/AppInfo/Application.php')
-rw-r--r--apps/files_sharing/lib/AppInfo/Application.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php
index 840f8a809ff..48802617b4f 100644
--- a/apps/files_sharing/lib/AppInfo/Application.php
+++ b/apps/files_sharing/lib/AppInfo/Application.php
@@ -38,6 +38,7 @@ use OCA\Files_Sharing\External\Manager;
use OCA\Files_Sharing\Listener\GlobalShareAcceptanceListener;
use OCA\Files_Sharing\Listener\LoadAdditionalListener;
use OCA\Files_Sharing\Listener\LoadSidebarListener;
+use OCA\Files_Sharing\Listener\UserShareAcceptanceListener;
use OCA\Files_Sharing\Middleware\OCSShareAPIMiddleware;
use OCA\Files_Sharing\Middleware\ShareInfoMiddleware;
use OCA\Files_Sharing\Middleware\SharingCheckMiddleware;
@@ -213,6 +214,7 @@ class Application extends App {
\OCP\Util::addScript('files_sharing', 'dist/collaboration');
});
$dispatcher->addServiceListener(ShareCreatedEvent::class, GlobalShareAcceptanceListener::class);
+ $dispatcher->addServiceListener(ShareCreatedEvent::class, UserShareAcceptanceListener::class);
// notifications api to accept incoming user shares
$dispatcher->addListener('OCP\Share::postShare', function(GenericEvent $event) {