Restrict User Roles in viewing a Node Content Type without installing a module Currently I want to keep my site slim without having to install big modules to do a small function. I know I can use the content_access module to restrict a user role to view a specific content type, but I was wondering how can this be done without any additional modules installed.

I have a content type of "widget" and I don't want it view-able by anonymous users. It should only be viewed by staff. How can you restrict/hide this content type from anonymous users without installing a module for it?
You can control node access using hook_node_access

e.g:

/**
 * Implements hook_node_access
 */
function MY_MODULE_node_access($node, $op, $account) {

  $type = is_string($node) ? $node : $node-&gt;type;

  if ($type == 'type_of_interest') {
    // Require administer nodes permission to view
    if (($op == 'view') &amp;&amp; (!user_access('administer nodes', $account))) {
      return NODE_ACCESS_DENY;
    }
  }

}