mirror of
https://github.com/nextcloud/server.git
synced 2026-03-12 21:52:19 -04:00
Merge pull request #39356 from nextcloud/backport/39323/39323-stable25
[stable25] getStorage before remove
This commit is contained in:
commit
166c63b8ca
1 changed files with 6 additions and 0 deletions
|
|
@ -143,4 +143,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