From fbeb29c810cd56e4fca6350260a9074ec913b48b Mon Sep 17 00:00:00 2001 From: Robert Schwanhold Date: Fri, 21 Sep 2018 11:55:14 +0200 Subject: [PATCH] added GlobalAccessContext --- app/controllers/ConfigurationController.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/ConfigurationController.scala b/app/controllers/ConfigurationController.scala index 598c7758a16..a57ac64b5a7 100755 --- a/app/controllers/ConfigurationController.scala +++ b/app/controllers/ConfigurationController.scala @@ -1,6 +1,6 @@ package controllers -import com.scalableminds.util.accesscontext.DBAccessContext +import com.scalableminds.util.accesscontext.{DBAccessContext, GlobalAccessContext} import com.scalableminds.util.tools.Fox import javax.inject.Inject import models.binary.{DataSet, DataSetDAO} @@ -50,7 +50,7 @@ class ConfigurationController @Inject()(userService: UserService, configurationJson: JsValue <- userDataSetConfigurationDAO.findOneForUserAndDataset(user._id, dataSetName) } yield DataSetConfiguration(configurationJson.validate[Map[String, JsValue]].getOrElse(Map.empty)) } - .orElse(dataSetDAO.findOneByName(dataSetName).flatMap(_.defaultConfiguration)) + .orElse(dataSetDAO.findOneByName(dataSetName)(GlobalAccessContext).flatMap(_.defaultConfiguration)) .getOrElse(dataSetConfigurationDefaults.constructInitialDefault(List())) .map(configuration => Ok(toJson(dataSetConfigurationDefaults.configurationOrDefaults(configuration)))) }