mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
Merge pull request #41131 from nextcloud/backport/41123/stable20
[stable20] fix(external): Get storage before update it
This commit is contained in:
commit
9757559df3
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