Field permissions per content type? I have a video field that should be visible only to authenticated users on one content type (bundle), but unrestricted on another content type.

What's a clean way to hide this field on one content type only, for anonymous users?

Notes:


I have the module field permissions installed, but it doesn't support per bundle field permissions.
I'm using Display Suite, so I'd rather not use a custom template unless that's the cleanest way to handle this one field.
I could create a new view mode that hides this field and and use HOOK_entity_view_mode_alter to switch to that view mode for anonymous users, but there are quite a lot fields to display so having 2 big view modes that are 95% the same seems kind of silly.


Edit: This is the code I used based on @wolverine's answer below:

function HOOK_utility_field_access($op, $field, $entity_type, $entity, $account) {

  //Check video field only when attached to 'lesson'.
  if ($field['field_name'] == 'field_video' &amp;&amp; $entity_type == 'node' &amp;&amp; $op == 'view' &amp;&amp; $entity-&gt;type == 'lesson') {

    //Grant access only if user is logged in.
    if ($account-&gt;uid &gt; 0) {
      return TRUE;
    }
    return FALSE;
  }
}
Since you want to do it for few fields, I would suggest to do it using custom code rather than any module.

You can implement hook_field_access($op, $field, $entity_type, $entity, $account) and check for the "field name, content type, user, operation" and then  deny or allow access.