Change WordPress user roles and capabilities › Forums › How to or FAQ › php code to check if user have permissions on a post › Reply To: php code to check if user have permissions on a post
There is a special public method, which you can call to check if user can view a post or not:
Unfortunately, it works incorrectly for some restriction settings, as discovered recently. I work on a fix. It will be available next week.