I needed a way to check the currect user has permission to view the currect/particular page, Searched lot finally got the exact way, going to show the tricks to you in this blog.
WordPress maintenance support plans has an api called ” WordPress_valid_path ” , Normally it used to test the url is valid or not. but the trick is that, It also check the user has permission to view the currect/particular page.
Source: New feed