Locking fields on a content type Using Drupal 7:

I have several content types with their own sets of fields, but I also have a set of fields that they must all share in common. That is easy enough through the administrative UI, but I'm writing a module that programmatically will add the fields to all node content types that I specify. Additionally, I do not want the administrator to be able to remove or edit those fields through the administrative UI.

How can I make it so that as an administrator is managing content types that the admin cannot modify or remove these fields that I have specified?

Alternatively, I know that I can create a separate entity and force field existence that way, but then I loose access to a lot of the functionality already built into the node entity, especially the function hook_node_access which is also a requirement for this module.

Anyone have any suggestions or know how to solve this?
Refer to the field api documentation here. You do not have to add permissions to block the delete. All you need to do is add the "locked" attribute to the field definition.


  locked (integer): Whether or not the field is available for editing.
  If TRUE, users can't change field settings or create new instances of
  the field in the UI. Defaults to FALSE.