Hi,
I've just enable og_access, and I found some problems.
The group visibility field widget has no data in it (not showing public group, private..., join this group...).
I've red this comment https://drupal.org/comment/7529685#comment-7529685, and I can see that it is hardcoded to FALSE any access to this field in any cases.

I think it should be good to check if we are viewing the node or editing the node, this way we can show the field in node views and deny access when editing.

I've attached a patch for it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

japerry’s picture

adding to the group privacy revamp meta issue

japerry’s picture

Status: Active » Needs review
TuWebO’s picture

Making the patch relative to the correct path.

TuWebO’s picture

Version: 7.x-3.9 » 7.x-3.13
FileSize
674 bytes

Rerolled the patch to math current version 3.13

TuWebO’s picture

Version: 7.x-3.13 » 7.x-3.x-dev
FileSize
548 bytes

Rerolled,
Making path to the root of the commons_group, also changed version.

TuWebO’s picture

Patch Reroll with the latest dev changes.

TuWebO’s picture

Patch Reroll with the latest dev changes.

TuWebO’s picture

Patch Reroll with the latest dev changes.

isellakuria’s picture

Is this patch working for you? I used it but I still cannot see the field.

TuWebO’s picture

Hi sellakuria,
It is working for me. I have it on a panelized group, and it is working fine so far.

TuWebO’s picture

Version: 7.x-3.x-dev » 7.x-3.18
Category: Feature request » Bug report
FileSize
613 bytes

Hi,
Patch has been rerolled with a little change. Also issue category has been changed, since not been able to see a group visibility fiel for a public group is more like a bug than a feature request.

TuWebO’s picture

Hi,
Make some changes to the patch, since we should take in account og_field_access and that entity exists.

If someone could test it, will be great.

TuWebO’s picture

Hi,
I think this issue is not resolved yet, I have tested it with the patch in #12, and it works, have anybody tested it?

MrBrightside’s picture

I'm pretty new to this, but hope my findings can help. I applied the patch manually (I can provide the code of the function if it helps to check it) but I still couldn't see that pesky drop-down for 'Group content visibility'.

After a bit of hacking about I managed to get it to display by commenting out the two following lines:

function commons_groups_field_access:

if (module_exists('og_access') && in_array($field_name, array(OG_CONTENT_ACCESS_FIELD, OG_ACCESS_FIELD))) {
//    return FALSE;
}

function commons_groups_form_node_form_alter:
//$form['group_content_access']['#access'] = FALSE;
(as detailed in the description and https://www.drupal.org/node/2018039#comment-7529685)

And then when editing choosing the following got the wiki in question to show on the front end when not logged in:
* Public - accessible to all site users
* Post to specific groups

If this post isn't helping let me know I'll remove it.