7 – How to avoid access to the node based on the user's role

I created a new function in my drupal 7 that grants permission to display content on the node. I have created a new hook_menu module implemented when I try to access the node. It gives "access denied error". I want to access the node according to the user's permission. If I want to debug node_access it does not work. I have installed the module "redirect 403 user login" for the conditions.

I have two websites and I want to show the data of a website in iframe. I created this module to show the content of my site on another website, but my redirected user login module 403 redirected to the login page I want to skip that login and show that content on my other website .

Module code:

mymodule_menu () {function
$ items = array ();

$ items['accesscontent/%'] = array (
& Title # & # 39; => t (& # 39; Content of the asset & # 39;),
& # 39; description & # 39; => t (& # 39; asset content page & # 39;),
& # 39; page callback & # 39; => & # 39; access_content_page & # 39 ;,
& # 39; page arguments & # 39; => array (1),
& # 39; access callback & # 39; => TRUE,
& # 39; type & # 39; => MENU_CALLBACK,
);

returns $ items;
}

function access_content_page ($ nid) {

$ nodeid = (int) $ nid;
return node_view (node_load ($ nodeid));
}

mymodule_node_access function ($ node, $ op, $ account) {
print_r ($ node);
print_r ($ op);
print_r ($ account);
die();
}