mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
Merge pull request #39365 from nextcloud/backport/39323/39323-stable19
[stable19] getStorage before remove
This commit is contained in:
commit
64980e6c98
1 changed files with 6 additions and 0 deletions
|
|
@ -140,4 +140,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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue