how disable edit for a certain content type, and a certain role,
In /admin/people/permissions Under "Node" category you can uncheck the permission "Edit content X" for your desired role. 

I would recommend using this module if your site has a lot of modules/permissions since due max upload vars limitation by PHP could led to not storing your chages when submitting the form.

Also by code you can implement hook_node_access and put there some logic. Take a look on how core does it.

/**
 * Implements hook_node_access().
 */
function node_node_access($node, $op, $account) {
  $type = is_string($node) ? $node : $node-&gt;type;

  if (in_array($type, node_permissions_get_configured_types())) {
    if ($op == 'create' &amp;&amp; user_access('create ' . $type . ' content', $account)) {
      return NODE_ACCESS_ALLOW;
    }

    if ($op == 'update') {
      if (user_access('edit any ' . $type . ' content', $account) || (user_access('edit own ' . $type . ' content', $account) &amp;&amp; ($account-&gt;uid == $node-&gt;uid))) {
        return NODE_ACCESS_ALLOW;
      }
    }

    if ($op == 'delete') {
      if (user_access('delete any ' . $type . ' content', $account) || (user_access('delete own ' . $type . ' content', $account) &amp;&amp; ($account-&gt;uid == $node-&gt;uid))) {
        return NODE_ACCESS_ALLOW;
      }
    }
  }

  return NODE_ACCESS_IGNORE;
}