Drupal is an open source content management platform powering millions of websites and applications around the world. It’s built, used, and supported by an active and diverse community of people internationally.
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.
Drupal has an api called " drupal_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.