Skip to content

Commit

Permalink
Cache content with everyone access
Browse files Browse the repository at this point in the history
We should not call `AllowAccessToEveryone` in the
loading event because it causes infinite loop when
page contains content area property.

Closes #228
  • Loading branch information
barteksekula committed May 2, 2023
1 parent 48fdfaa commit af22b24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Expand Up @@ -34,7 +34,7 @@ private void Events_LoadingContent(object sender, ContentEventArgs e)
if (cachedContent != null)
{
e.ContentLink = cachedContent.ContentLink;
e.Content = cachedContent.AllowAccessToEveryone();
e.Content = cachedContent;
e.CancelAction = true;
}

Expand Down
1 change: 1 addition & 0 deletions src/Alloy.Sample/Alloy.Sample.csproj
Expand Up @@ -13,6 +13,7 @@
<ItemGroup>
<PackageReference Include="EPiServer.CMS.TinyMce" />
<PackageReference Include="EPiServer.CMS.AspNetCore.HtmlHelpers" />
<PackageReference Include="EPiServer.CMS.AspNetCore.Routing" />
<PackageReference Include="EPiServer.CMS.UI" />
<PackageReference Include="EPiServer.CMS.UI.AspNetIdentity" />
<PackageReference Include="EPiServer.CMS.UI.VisitorGroups" />
Expand Down

0 comments on commit af22b24

Please sign in to comment.