Skip to content

Commit 8822258

Browse files
Merge pull request #39354 from nextcloud/backport/39323/39323-stable27
[stable27] getStorage before remove
2 parents eae4a1e + 6c98f95 commit 8822258

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

apps/files_external/lib/Service/UserStoragesService.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,4 +143,10 @@ public function getVisibilityType() {
143143
protected function isApplicable(StorageConfig $config) {
144144
return ($config->getApplicableUsers() === [$this->getUser()->getUID()]) && $config->getType() === StorageConfig::MOUNT_TYPE_PERSONAl;
145145
}
146+
147+
public function removeStorage($id) {
148+
// verify ownership through $this->isApplicable() and otherwise throws an exception
149+
$this->getStorage($id);
150+
parent::removeStorage($id);
151+
}
146152
}

0 commit comments

Comments
 (0)