diff options
author | Andy Scherzinger <info@andy-scherzinger.de> | 2023-07-13 14:17:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-13 14:17:52 +0200 |
commit | ec0e9dd458c688666b4677d380e01162f934a50f (patch) | |
tree | 2bdf597eac0a70875b952ef0a9e10eb32ec2e8bf | |
parent | 4f2b35f9354ac0aaa9b393d117306ed4aa8818d3 (diff) | |
parent | bb189784f28e96c87093b9967e4c6b4eaa713369 (diff) | |
download | nextcloud-server-ec0e9dd458c688666b4677d380e01162f934a50f.tar.gz nextcloud-server-ec0e9dd458c688666b4677d380e01162f934a50f.zip |
Merge pull request #39355 from nextcloud/backport/39323/39323-stable26
[stable26] getStorage before remove
-rw-r--r-- | apps/files_external/lib/Service/UserStoragesService.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/files_external/lib/Service/UserStoragesService.php b/apps/files_external/lib/Service/UserStoragesService.php index 9a1e4e648b3..6cf34000ab0 100644 --- a/apps/files_external/lib/Service/UserStoragesService.php +++ b/apps/files_external/lib/Service/UserStoragesService.php @@ -143,4 +143,10 @@ class UserStoragesService extends StoragesService { protected function isApplicable(StorageConfig $config) { return ($config->getApplicableUsers() === [$this->getUser()->getUID()]) && $config->getType() === StorageConfig::MOUNT_TYPE_PERSONAl; } + + public function removeStorage($id) { + // verify ownership through $this->isApplicable() and otherwise throws an exception + $this->getStorage($id); + parent::removeStorage($id); + } } |