mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #41125 from nextcloud/backport/41123/stable26
[stable26] fix(external): Get storage before update it
This commit is contained in:
commit
c528b88b4f
1 changed files with 3 additions and 0 deletions
|
|
@ -127,6 +127,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