Skip to content

Commit ec0e9dd

Browse files
Merge pull request #39355 from nextcloud/backport/39323/39323-stable26
[stable26] getStorage before remove
2 parents 4f2b35f + bb18978 commit ec0e9dd

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)