summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-01-16 18:42:42 +0100
committerJulius Härtl <jus@bitgrid.net>2020-01-17 01:35:12 +0100
commit035fe3db7b1c30f950e5cb750fab4c36a4c0b3fd (patch)
tree583fd1c59d2aa0d9ef79555f9a5959834874db90 /apps
parentd92500178f61a4dd97be73f0b2d0acba2bc14ca4 (diff)
downloadnextcloud-server-035fe3db7b1c30f950e5cb750fab4c36a4c0b3fd.tar.gz
nextcloud-server-035fe3db7b1c30f950e5cb750fab4c36a4c0b3fd.zip
Remove global share accepter since auto-accepting is the default
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/composer/composer/autoload_classmap.php1
-rw-r--r--apps/files_sharing/composer/composer/autoload_static.php1
-rw-r--r--apps/files_sharing/lib/AppInfo/Application.php1
-rw-r--r--apps/files_sharing/lib/Listener/GlobalShareAcceptanceListener.php63
4 files changed, 0 insertions, 66 deletions
diff --git a/apps/files_sharing/composer/composer/autoload_classmap.php b/apps/files_sharing/composer/composer/autoload_classmap.php
index 7259ca80d16..8f77798bb86 100644
--- a/apps/files_sharing/composer/composer/autoload_classmap.php
+++ b/apps/files_sharing/composer/composer/autoload_classmap.php
@@ -48,7 +48,6 @@ return array(
'OCA\\Files_Sharing\\Helper' => $baseDir . '/../lib/Helper.php',
'OCA\\Files_Sharing\\Hooks' => $baseDir . '/../lib/Hooks.php',
'OCA\\Files_Sharing\\ISharedStorage' => $baseDir . '/../lib/ISharedStorage.php',
- 'OCA\\Files_Sharing\\Listener\\GlobalShareAcceptanceListener' => $baseDir . '/../lib/Listener/GlobalShareAcceptanceListener.php',
'OCA\\Files_Sharing\\Listener\\LoadAdditionalListener' => $baseDir . '/../lib/Listener/LoadAdditionalListener.php',
'OCA\\Files_Sharing\\Listener\\LoadSidebarListener' => $baseDir . '/../lib/Listener/LoadSidebarListener.php',
'OCA\\Files_Sharing\\Listener\\UserShareAcceptanceListener' => $baseDir . '/../lib/Listener/UserShareAcceptanceListener.php',
diff --git a/apps/files_sharing/composer/composer/autoload_static.php b/apps/files_sharing/composer/composer/autoload_static.php
index 5894f5d43db..85eb5232bda 100644
--- a/apps/files_sharing/composer/composer/autoload_static.php
+++ b/apps/files_sharing/composer/composer/autoload_static.php
@@ -63,7 +63,6 @@ class ComposerStaticInitFiles_Sharing
'OCA\\Files_Sharing\\Helper' => __DIR__ . '/..' . '/../lib/Helper.php',
'OCA\\Files_Sharing\\Hooks' => __DIR__ . '/..' . '/../lib/Hooks.php',
'OCA\\Files_Sharing\\ISharedStorage' => __DIR__ . '/..' . '/../lib/ISharedStorage.php',
- 'OCA\\Files_Sharing\\Listener\\GlobalShareAcceptanceListener' => __DIR__ . '/..' . '/../lib/Listener/GlobalShareAcceptanceListener.php',
'OCA\\Files_Sharing\\Listener\\LoadAdditionalListener' => __DIR__ . '/..' . '/../lib/Listener/LoadAdditionalListener.php',
'OCA\\Files_Sharing\\Listener\\LoadSidebarListener' => __DIR__ . '/..' . '/../lib/Listener/LoadSidebarListener.php',
'OCA\\Files_Sharing\\Listener\\UserShareAcceptanceListener' => __DIR__ . '/..' . '/../lib/Listener/UserShareAcceptanceListener.php',
diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php
index 5a18cce8e49..c8d2097e882 100644
--- a/apps/files_sharing/lib/AppInfo/Application.php
+++ b/apps/files_sharing/lib/AppInfo/Application.php
@@ -213,7 +213,6 @@ class Application extends App {
$dispatcher->addListener('\OCP\Collaboration\Resources::loadAdditionalScripts', function() {
\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
diff --git a/apps/files_sharing/lib/Listener/GlobalShareAcceptanceListener.php b/apps/files_sharing/lib/Listener/GlobalShareAcceptanceListener.php
deleted file mode 100644
index a536646aaa0..00000000000
--- a/apps/files_sharing/lib/Listener/GlobalShareAcceptanceListener.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-/**
- * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-namespace OCA\Files_Sharing\Listener;
-
-use OCP\EventDispatcher\Event;
-use OCP\EventDispatcher\IEventListener;
-use OCP\IConfig;
-use OCP\Share\Events\ShareCreatedEvent;
-use OCP\Share\IManager;
-use OCP\Share\IShare;
-
-class GlobalShareAcceptanceListener implements IEventListener {
-
- /** @var IConfig */
- private $config;
- /** @var IManager */
- private $shareManager;
-
- public function __construct(IConfig $config, IManager $shareManager) {
- $this->config = $config;
- $this->shareManager = $shareManager;
- }
-
- public function handle(Event $event): void {
- if (!($event instanceof ShareCreatedEvent)) {
- return;
- }
-
- if ($this->config->getSystemValueBool('sharing.interal_shares_accepted', false)) {
- $share = $event->getShare();
-
- if ($share->getShareType() === IShare::TYPE_USER || $share->getShareType() === IShare::TYPE_GROUP) {
- $share->setStatus(IShare::STATUS_ACCEPTED);
- $this->shareManager->updateShare($share);
- }
- }
- }
-
-}