The CTools plugin included in og_member.inc can only check if a user is a member of a node group type. This is due to the hardcoded entity types in this line of og_member_ctools_access_check():
return og_is_member('user', $node->nid, 'user', $account, $conf['state']);
This is problematic when using OG of other entity types, for example users. Commons uses a model like this, where they create user groups (with group ID = user ID) to keep track of which users have added each other to their contact list. As a result, I'm unable to add a Panels selection rule for the OG-based user contacts membership.

I looked briefly into this and at first glance it looks like we'd automatically generate a access plugin for each entity type available on the system... That's not really ideal, nor possible with the current ctools framework as far as I know. I believe each plugin must be a file, and there's no opportunity for us to dynamically create plugins?

If that's the case, then we should document this fact and the change title of the membership plugin to reflect that it can only check node groups such as "OG: user membership in user node group".

Comments

stewart.adam’s picture

Issue summary: View changes