correctly set applicables when updating user storage

This commit is contained in:
Robin Appelman 2016-01-05 13:29:56 +01:00 committed by Vincent Petry
parent 8da3c3f125
commit 68bd003e4b
1 changed files with 13 additions and 0 deletions

View File

@ -109,6 +109,19 @@ class UserStoragesService extends StoragesService {
return $config;
}
/**
* Update storage to the configuration
*
* @param StorageConfig $updatedStorage storage attributes
*
* @return StorageConfig storage config
* @throws NotFoundException if the given storage does not exist in the config
*/
public function updateStorage(StorageConfig $updatedStorage) {
$updatedStorage->setApplicableUsers([$this->getUser()->getUID()]);
return parent::updateStorage($updatedStorage);
}
/**
* Get the visibility type for this controller, used in validation
*