Merge pull request #2436 from umbraco/temp-U4-10957_2

U4-10957 If RequiredSection is not defined in a tour - backoffice wil…
This commit is contained in:
Shannon Deminick
2018-03-21 12:24:10 +11:00
committed by GitHub

View File

@@ -70,14 +70,20 @@ namespace Umbraco.Web.Editors
//Checking to see if the user has access to the required tour sections, else we remove the tour
foreach (var backOfficeTourFile in result)
{
foreach (var tour in backOfficeTourFile.Tours)
if (backOfficeTourFile.Tours != null)
{
foreach (var toursRequiredSection in tour.RequiredSections)
foreach (var tour in backOfficeTourFile.Tours)
{
if (allowedSections.Contains(toursRequiredSection) == false)
if (tour.RequiredSections != null)
{
toursToBeRemoved.Add(backOfficeTourFile);
break;
foreach (var toursRequiredSection in tour.RequiredSections)
{
if (allowedSections.Contains(toursRequiredSection) == false)
{
toursToBeRemoved.Add(backOfficeTourFile);
break;
}
}
}
}
}