Preview page without EPiServer CMS Editor rights

Vote:
 

Hi guys

We have currently a setup where we allow users to preview a page without it being published with all its assets that are stored in ContentAssetFolder.

The issue is currently that we can do a preview, but only if we access to the EPiServer CMS UI as an editor.

So I have a million Monopoly dollar question:

How can we grant access to the users that are authorized access to the page, but shouldn't have access to the EPiServer CMS UI?

Best regards

Miroslav

#198450
Oct 29, 2018 10:58
Vote:
 

I assume you are using MVC. If so then you can register a filter provider that removes the access check for certain request (that is done by AuthorizeContentAttribute). You can see an example in ProjectFilterProvider in https://world.episerver.com/blogs/Mark-Hall/Dates/2016/11/anonymous-project-preview/

#198451
Oct 29, 2018 11:06
Vote:
 

Thanks Johan, will try and get back with the result. ;)

#198453
Oct 29, 2018 11:10
Vote:
 

Hi Miso

There is also a Nuget package which does this for you: https://nuget.episerver.com/package/?id=eGandalf.Epi.PagePreview 

Project site: https://github.com/egandalf/eGandalf.Epi.PagePreview

David

#198462
Oct 29, 2018 12:32
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.