Hi,

Issue - Overriding the roles and permission does not work for multiple organic groups fields.

Requirement - Groups Fields permission should overridden.

I have added two groups but permissions for group is not getting overridden. I created one group choose override group roles and permissions and also choose group to be private. It was all working very well.

Then I create second group and choose same settings as for first one. But in this group I selected one of the field not be shown to the member of the group. I revoked one of the field permission.

Issue arises here I am still able to see the same field for which I revoked permission.

But if I remove the permission from first group than it removes the field from both groups.

Can anyone help me with this?

I have looked into the code of og_field_access.module

foreach (og_get_entity_groups() as $group_type => $gids) {
foreach ($gids as $gid) {
if (og_user_access($group_type, $gid, $perm)) {
return TRUE;
}
}
}

Above code specifies to check for all the groups. Which should not happen. It should only check for the current group. Only than it will solve the purpose of overridden field access permissions.

Can anyone add patch for the same? Or let me know how to generate path. I am not aware how to create a patch. My bad.