mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
fix(external): Get storage before update it
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
d844c956b1
commit
0a428f080c
1 changed files with 3 additions and 0 deletions
|
|
@ -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…
Reference in a new issue