Preview functionality outside the Episerver edit mode

Episerver has preview functionality available in edit mode. It did not satisfy our customer. The customer wanted to see the page as it will be displayed when get published. But I found that Episerver has "hidden" feature which enables you to display concrete content version.

Episerver's HierarchicalCatalogPartialRouter already supports the versioned content display. You just have to take a string representation of the content link which has version info and append it to the URL by separating it with two commas. The URL will look like this:

http://localhost:53233/EPiServer/CMS/Content/en/,,315_1552/

But it seems the url does not work with visitor group

In preview/edit mode, we need "visitorgroupsByID" parameter in the Url to get the visitor group work (impersonate mechanism)
It looks like this: 

http://localhost:53233/EPiServer/CMS/Content/en/,,315_1552/?visitorgroupsByID=d5cb0441-90a5-4295-bc17-6548cb47b989

By default, if we don't set the visitorgroupsByID it will be treated as null => the same behavior with "Toggle view settings" is set to none.
In case we need a workaround to force visitor group check by default, we can follow these steps as below:
1. Create a class ForceVisitorGroupCheckAttribute (reference to the attach file)
2. Put the attribute created in step 1 above the controller:

[ForceVisitorGroupCheck]
 public class StartPageController : PageController<StartPage>
 {}