I cannot for the life of me get the button to display for any other role. Nothing in permissions or og access seems to govern this. I have tried various random actions: disabling and re-enabling 'Commons Search Solr User' module, reverting (or at least trying to revert) the Commons Trusted Contacts feature.
The Field Instances and Message type areas of the feature refuse to revert to default, though.
Perhaps this isn't a bug and I'm just looking in the wrong place to get this working or there is some clash in the setup of my modules.
Any leads will be gratefully followed...
Comments
Comment #1
albertosouza commentedThis is a bug in commons_groups
To reproduce:
The code with bug probably are:
File commons_groups.module line 12
I needed more time to solve this problem but is necessary to ensure that commons_groups permissions mechanism only applies to the content type groups and keep the possibility of creating other types of groups as groups of courses or research groups
Comment #2
timfelix commentedHi.
I've been struggling with this for days.
not sure if it helps but giving 'Administer Organic groups permissions' causes the button to show for those users.
Any pointers would be really appreciated.
Comment #3
timfelix commentedI found a fix for my problem:
somehow the 'og permissions' had changed for the 'OG User - User'
so on this page:
admin/config/group/permissions/user/user
for 'Contribute to the group', the checkbox for 'non-member' should be checked but disabled.
However, mine was unchecked but disabled.
I had to temporarily remove the commons_groups_og_permission_alter() function in commons_groups.module to allow me to check this box. then disable the checkbox again by putting in the function again.
This made the 'add as trusted contact' button reappear on user profiles.
Comment #4
timfelix commentedsee
Comment #5
agileware commentedWe had to run a database query to fix this problem. It's a bug in Drupal Commons - and a pretty big one. I didn't work on the fix myself, but will ask internally if there is a patch available.
Comment #6
devin carlson commentedIt looks like there are three issues here:
commons_groups_og_permission_alter()is being used to "disable" thesubscribeandsubscribe without approvalpermissions but it is really just hiding the checkboxes on the permissions page. If a user submits the form, the permissions receive a different value (no one receives permissions).subscribepermission and nobody has thesubscribe without approvalpermission but actually attempts to remove both permissions for all users incommons_groups_og_permission_alter().The attached patch stops
commons_groups_og_permission_alter()from attempting to alter the roles associated with each permission, properly removes the permissions from the permissions form and featurizes the required permissions.Comment #7
devin carlson commentedRetested #6 with a fresh and an existing Commons site and verified that the
subscribeandsubscribe without approvalpermissions were properly disabled and that running the update function properly fixed the permissions on existing sites.Committed #6 to Commons 7.x-3.x.