I am developing site with several groups - lets call them group "A", "B", etc. All groups have a field "type" based on a taxonomy list. I have also created several content types, these content types need to be connected with a group based on the group type.

If user who is a member of group "A" with type "X" this user needs only see content types created for group type "X".

Is there a way to check the content type so that only the correct group types have access to the content type. Also groups with the same type only need to see there own data, so group "B" with type "X" only needs to have access to group "B" content.

I thought I can create a module that checks on the group type field and also a type field for the content forms. When both the same the user has access (not yet an idea on the implementation). Or maybe there is a way by something like rules I can use?

I am using Drupal 7 and OG 7.2