How to customize permissions for a custom module I created a custom module that hides a field in a content type editing screen from the user and simultaneously auto-selects a value for that field for the user. It works great for the admin role but for some reason my other user's who are able to login and who have permission to edit the content type don't get this functionality applied. They still see the field and can still select a value for it.

Anyone know how to make the permissions for a custom module apply to ALL users?

Here's my module code:

/**
 * @file
 * Auto saving to a term reference field.
 */ 
 /** 
  * Implementation of hook_form_alter().
  */
function seven_form_resource_node_form_alter(&amp;$form, &amp;$form_state, $form_id) {
    hide($form['field_icon']);
}
/**
 * Implementation of hook_node_presave().
 */
function grouphideandselect_node_presave($node){
  //Condition for particular content type
  if($node-&gt;type == 'resource'){
    $icon_ary = array();
    //Array to map category with icon given as Category=&gt;Icon
    $field_type_to_icon = array(1 =&gt; 1,2 =&gt; 1,3 =&gt; 1,4 =&gt; 2,5 =&gt; 
2,6 =&gt; 2,7 =&gt; 2,8 =&gt; 6,9 =&gt; 6,97=&gt;6,98 =&gt; 6);
    $category = $node-&gt;field_type['und'];
    foreach($category as $k=&gt;$c){
      $icon = $field_type_to_icon[$c['value']];
      if(!in_array($icon, $icon_ary)){
        $icon_ary[] = $icon;
        $node-&gt;field_icon['und'][$k]['tid'] = $icon;
      }
    }
  }        
}
Add the Field Permissions module, this gives you control over every field in the content type. You edit the permissions on a field by field basis in the content type editing area. This gives you control over editing, and viewing the field.

https://www.drupal.org/project/field_permissions