diff --git a/apps/files_external/lib/Service/UserStoragesService.php b/apps/files_external/lib/Service/UserStoragesService.php index 6cf34000ab009..47a6e919853ab 100644 --- a/apps/files_external/lib/Service/UserStoragesService.php +++ b/apps/files_external/lib/Service/UserStoragesService.php @@ -127,6 +127,9 @@ public function addStorage(StorageConfig $newStorage) { * @throws NotFoundException if the given storage does not exist in the config */ public function updateStorage(StorageConfig $updatedStorage) { + // verify ownership through $this->isApplicable() and otherwise throws an exception + $this->getStorage($updatedStorage->getId()); + $updatedStorage->setApplicableUsers([$this->getUser()->getUID()]); return parent::updateStorage($updatedStorage); }