Skip to content

Commit 0002141

Browse files
Merge pull request #39362 from nextcloud/backport/39323/stable21-39323
[stable21] getStorage before remove
2 parents 59e117c + ea519e9 commit 0002141

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
@@ -140,4 +140,10 @@ public function getVisibilityType() {
140140
protected function isApplicable(StorageConfig $config) {
141141
return ($config->getApplicableUsers() === [$this->getUser()->getUID()]) && $config->getType() === StorageConfig::MOUNT_TYPE_PERSONAl;
142142
}
143+
144+
public function removeStorage($id) {
145+
// verify ownership through $this->isApplicable() and otherwise throws an exception
146+
$this->getStorage($id);
147+
parent::removeStorage($id);
148+
}
143149
}

0 commit comments

Comments
 (0)