This is not possible, and by default roles are not global. Patch attached, but I didn't find a better option than a variable.

Files: 
CommentFileSizeAuthor
#15 1985800-15-og_global_roles_permissions.patch4.17 KBjaperry
PASSED: [[SimpleTest]]: [MySQL] 1,291 pass(es).
[ View ]
set_default_value_og_roles.patch654 bytesSebCorbin
PASSED: [[SimpleTest]]: [MySQL] 828 pass(es).
[ View ]

Comments

amitaibu’s picture

I understand what you want -- but how would this deal with groups that have different settings?

SebCorbin’s picture

This is a global setting, but how would we guess what the admin wants if we upgrade from a version that does not handles per-group permissions?

amitaibu’s picture

Yes, what I mean is that if the roles we request are global (i.e. via settings), then we probably can skip all the parts we try to set the permissions for those groups.

SebCorbin’s picture

I think these permissions (even global) are required for the good functionning of OG module.

I may not understand what you mean though, have ou any concrete task to fix this issue?

amitaibu’s picture

> have ou any concrete task to fix this issue?

Yes, the question is how OgUiSetRoles should behave. Currently it sets permissions per group. How would your use case need it?

Also, I'd be happy to get some docs about this variable, so it won't be completely hidden ;)

SebCorbin’s picture

Issue tags:+Localize D7 port

Adding tag

SebCorbin’s picture

StatusFileSize
new2 KB
PASSED: [[SimpleTest]]: [MySQL] 1,165 pass(es).
[ View ]

As far as I can see, OgUiSetRoles set anonymous and authenticated permissions relative to group subscription based on the D6 property $node->og_selective.

If I set the variable og_7000_access_field_default_value to FALSE (global roles), OgUiSetRoles runs but has no effect as roles are global.
So I changed my patch to dynamically include OgUiSetRoles depending on the variable and I added documentation.

When global roles are enabled, the admin will still need to check global permissions relative to subscription.

How does that sound?

amitaibu’s picture

If the variable is set to TRUE OgUiSetRoles should probably be skipped.

SebCorbin’s picture

A default value to TRUE means that there is no global roles and that OgUiSetRoles runs to set anonymous and authenticated permissions relative to group subscription.

amitaibu’s picture

Sorry, I meant FALSE.

Also it would be great if you could execute the migrate tests locally, as they are not picked up by the testbost.

SebCorbin’s picture

Category:Feature request» Task
Issue summary:View changes
StatusFileSize
new3.23 KB
PASSED: [[SimpleTest]]: [MySQL] 1,165 pass(es).
[ View ]

I added a little script that add global permissions on global roles based on Drupal's main permissions.

Gábor Hojtsy’s picture

@sebcorbin: that patch sets a new default for the field, but it does not add the field... Is the field added already in the patched code? Should we remove the field in an update function on our own? Sorry wrong issue, meant for #2349587: Revoke ability to customize per group roles/permissions entirely.

japerry’s picture

StatusFileSize
new3.48 KB
PASSED: [[SimpleTest]]: [MySQL] 1,291 pass(es).
[ View ]

Here is a re-roll with the latest version of og dev.

japerry’s picture

StatusFileSize
new4.17 KB
PASSED: [[SimpleTest]]: [MySQL] 1,291 pass(es).
[ View ]

This needed some more work, the patch above was not mapping roles to the right rid's because of the og_role_save function, which sets rid as a primary key, and thus doesn't execute a drupal_write_record properly.

Its important to keep the rids the same, so I've taken the guts from og_role_save and applied it here.