November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
1. Set permissions on a few pages.
2. Grab the pages as an list
3. Use the FilterForVisitor function to filter out the pages.
FilterForVisitor is a filter that removes any pages that the current user does not have access to or that is not currently published.
Good luck
Thank for repsonse,
FilterForVisitor is only filter pages that current user has read permission. How can I get pages that visible to everyone? I want to get list of private pages (Pages can only be seen by logged in user) and a list of public pages (Pages can be seen by everyone)? Private pages exclude Public pages.
FilterAccess.QueryDistinctAccessEdit() will return true for a page that match a certain accesslevel for a certain principal, and you can use the PrincipalInfo.AnonymousPrincipal to match "everyone".
FilterAccess.QueryDistinctAccessEdit(page, AccessLevel.Read, PrincipalInfo.AnonymousPrincipal)
See Episerver SDK
You could use that method to filter your lists appropriately.
Hi,
How can I get list of pages that have visible to everyone? And list of pages that only current logged in user can read (exclude pages has visible to everyone)?