title: Drupal: How do you remove the "Edit" tab for a node under certain conditions?
body: <p>I have a node form that the author should be able to edit, unless certain conditions are true. I would like to remove the "Edit" tab under those conditions, for the author. Power users should still be able to use the "Edit" tab.</p>
  
  <p>The <code>hook_menu_alter()</code> function doesn't work for me because it only gets called when the menu gets built, before it is put into cache.</p>
  
  <p>I would prefer to (a) do this without adding another contrib module and (b) at the module level, instead of the theme level (for security), but am interested in hearing other ways as well.</p>