preventing users from using certain options on a page

I'm trying too use the code found here http://pastebin.com/DJNhrUjG on this page to prevent users from accessing the page when they are not the page creator and the field get_field('visitors_allowed_to_add_content is set to no on that memorial page

the full page code is found at http://pastebin.com/dKnKn3Jz