mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
getStorage before remove
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
This commit is contained in:
parent
5a23ffd544
commit
75f2ffd304
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