How to change logged-in user permission in hook_node_view? Can anyone please let me know how can we achieve the following scenario

I want to change the role of the logged-in user before viewing the node. When you click on the node for viewing it, I want the roles to be changed and then display the content accordingly with the access permissions.
using  hook_node_access(),here you can check user role by using 

global $user;
$roles=$user-&gt;roles;