A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
AI OnAI Off
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
Hi! Are the pages protected by access rights? Then they should be excluded if you use the FindPagesWithCriteria method and not FindAllPagesWithCriteria. To make sure that the call is made as an anonymous user you can try this code:
IPrincipal oldPrincipal = EPiServer.Security.PrincipalInfo.CurrentPrincipal; EPiServer.Security.PrincipalInfo.CurrentPrincipal = EPiServer.Security.PrincipalInfo.AnonymousPrincipal; // Make the call to FindPagesWithCriteria here ... // Go back to the original principal. EPiServer.Security.PrincipalInfo.CurrentPrincipal = oldPrincipal;
Hi,
How is it done to exclude URLS from a search when using PropertyCriteria. For example I need to exclude pages under a Member area from appearing in a sitemap.
I am using Episerver 8 but we are using PropertyCriteria.
Thanks
Jon