Skip to content
Permalink
Browse files

On package install, DataPackageFragmentInsaller will use default cult…

…ure, if user culture is not available. Previously the package install would raise an error. Motivation: For setup flows, where user auth is changed via a package, user information cannot be expected to be available within the same request.
  • Loading branch information...
mawtex committed May 22, 2019
1 parent 0efd384 commit 3bfefb4880fefb6fd1bd9f5b2366801cf7050ca3
@@ -120,9 +120,12 @@ public override IEnumerable<XElement> Install()
}
else if (dataType.AddToCurrentLocale)
{
Verify.That(UserValidationFacade.IsLoggedIn(), "Cannot add to the current locale as there's no logged in user.");
var currentLocale = DataLocalizationFacade.DefaultLocalizationCulture;
if (UserValidationFacade.IsLoggedIn())
{
currentLocale = UserSettings.ActiveLocaleCultureInfo;
}

var currentLocale = UserSettings.ActiveLocaleCultureInfo;
using (new DataScope(currentLocale))
{
XElement element = AddData(dataType, currentLocale);

0 comments on commit 3bfefb4

Please sign in to comment.
You can’t perform that action at this time.