I'm using Drupal 7 with Webform and Content Access contrib modules.
I wrote a little snippet that displays all items for a given menu, and greys out the ones that the user doesn't have access to, while the accessible ones are links.
I get the access control information with
...if that helps at all. It returns 1 if access should be granted, and NULL if not.
The problem I'm encountering is that, while this code works swimmingly for normal nodes, webforms seem to return a 1 for access even when the logged-in user does not have permission to submit that form. So the link shows up, and then it takes the user to a page that says "You do not have permission to view this form."
What function do I call to find out whether a webform of a certain path (or title or whatever I can find out from menu_link_load) should be visible to the user?