fix(external): Get storage before update it

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/41131/head
Joas Schilling 7 months ago
parent 3f61e6d196
commit d4946b6bfa
No known key found for this signature in database
GPG Key ID: 74434EFE0D2E2205

@ -124,6 +124,9 @@ class UserStoragesService extends StoragesService {
* @throws NotFoundException if the given storage does not exist in the config
*/
public function updateStorage(StorageConfig $updatedStorage) {
// verify ownership through $this->isApplicable() and otherwise throws an exception
$this->getStorage($updatedStorage->getId());
$updatedStorage->setApplicableUsers([$this->getUser()->getUID()]);
return parent::updateStorage($updatedStorage);
}

Loading…
Cancel
Save