Hi,

Let me see how to explain this.

We have content types that have OG field permissions attached to them, e.g. for some fields only members can see them, for others everyone can see them. This all works as expected.

Now I add NEW fields (and their OG permissions) to that content type.

If I add new nodes (with the new fields, the permissions are fine, the Issue is the older nodes, the permissions for the new fields are ignored there (only admins can see the field data in those nodes, and not the assigned permission set).

So my question is,

Is there any way, method or function I can call to do a recursive rebuild of all OG node permissions?

Any help would be appreciated, even if I just have to call some functions in a custom mod to rebuild the permissions that would be fine, for now it's a real showstopper for us.

Cheers,

Jeroen

Comments

JeroenKool’s picture

Found that I had to manually add the permissions in the og_role_permissions table for existing nodes, smth the module should take care off on field additions, but works for now it is a work around.

INSERT INTO `database`.`og_role_permission` (`rid`, `permission`, `module`) VALUES ('RID', 'permission', 'og_field_access');

Hope future versions will have this bug fixed.

shushu’s picture

Status: Active » Postponed (maintainer needs more info)

Good you at least got a workaround.
Now, for the bug, I would like to see if I follow you:
1. Create content type which is a group (G), create content type which is group content (C).
2. Enable OG fields permissions, add some fields to C and set its permissions for members.
3. Create new C nodes and see the permissions are working as expected.
4. Add new field for C with similar field permissions. Go as a member to the old nodes and see permissions does not take affect.

Is this a proper description ?