mirror of
https://github.com/nextcloud/server.git
synced 2026-04-12 20:47:04 -04:00
fix(external): Get storage before update it
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
84c153e34c
commit
7105380511
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