In addition to the normal single post view on my website, I added a full screen version of the post with entirely new set of styles. In this full screen option, everything is removed except the_content() of the post.
I did a functional non standard php template for this purpose called prompter.php and I put it in the root of my site.
In each single post, there is a button called "prompter view" that will trigger the view of the current post in "prompter mode" (full screen mode)
Everything is working OK, until I apply role based permission on my post.
It turns out my full screen mode is not being protected by the role permission set by wordpress.
My question is how can I make my custom post template inherit the permission set on the normal post template?
Here are the example of what I am trying to say.
Single post using normal template (unprotected)
Single post using full screen mode (unprotected)
Single post using normal template (Protected)
Single post using full screen mode (still unprotected)
It turns out that even there is a restriction imposed on post 2193, if the user will go straight to the fullscreen template and supply the post ID, the post will still be viewable without permission check.
How Can I make my full screen template protected also by WordPress permission settings?