How to manage programmatically the access of a content node type?
We need to set permission for doing this. Permission can be done specific to a Role not to a User. Please use below codes. Please update your role name instead of 'New Role' and machine name of your content_type instead of 'your_content_type'.

$role_name = "New Role";
$role_permissions = array(
  'create your_content_type content',
  );

$role = user_role_load_by_name($role_name);
user_role_grant_permissions($role-&gt;rid, $role_permissions);