Support #24471
openGroup Member can edit content in the Library
0%
Description
Via keeping, Mariya Gluzman reports
"We are having some issues with the permissions settings in the group BCEI Learning Modules (https://commons.gc.cuny.edu/groups/program-participants-402589737/). We created two test user accounts that we added as Members to the group. From my understanding, a Member should not be able to edit any of the content in the Library. However, when we view content there, Edit is one of the options. "
I went in to test and she is correct. Added Colin and Laurie to this ticket as we discussed it on the call
Updated by Raymond Hoh 21 days ago
I believe the original intention behind Group Library Docs was to allow any group member to make modifications to a Doc. However the use case brought up in Keeping about limiting doc edit access to group admins and moderators makes sense.
If we want to implement this, we would need to make some changes to the Group Library and to the buddypress-docs-in-group plugin to show some additional doc options. Boone, in vanilla BuddyPress Docs, it is possible to set the access control for each group's document:

However the buddypress-docs-in-group plugin removes the "Access" controls when creating or editing a group doc: https://github.com/boonebgorges/buddypress-docs-in-group/blob/ea686cde3da444366a2915c2886ce46e5f36503d/includes/bpdig.php#L194
Removing the Access section was probably done to simplify doc access controls within the group, but would it make sense to bring the Access block back, but adding each group membership level as an additional option? Or perhaps these access controls could be configured at the group level under a group's "Manage > Group Settings" section as well?
As it pertains to the Group Library, Group Library outputs its own version of BuddyPress Docs settings -- https://github.com/cuny-academic-commons/cac-group-library/blob/master/assets/js/app/components/Forms/BpDocForm.vue -- which would need to be modified if we wanted to add back the Access section at the individual doc level.
Updated by Boone Gorges 20 days ago
- Category name set to Group Library
- Target version set to 2.8.0
Ray, thanks so much for jumping in.
Ray is correct that Docs work this way intentionally. We made the decision long ago that we would simply allow group Docs to be edited by anyone in the group. Other types of library items, in contrast, can be edited only by (a) the item author, or (b) those users who are group admins or mods.
That being said, I can see why you might not want it to work this way. I like the idea of adding item-level controls over who can edit/delete an item. These would be similar to the 'Who can edit this Doc?' dropdown from Ray's screenshot, though perhaps we'd want to make it radio buttons instead: Allow this doc to be edited by [] any group member [] author/admin only. Or something like that. It would be important to make this work across all item types, not just bp_doc - so 'Editable Doc', 'Uploaded File', 'External Link'. The setting wouldn't apply to 'Forum Attachment', since that would only be editable by those with permission to edit the forum attachment anyway.
If others think this is a worthwhile project, we could work on it for an upcoming release.