Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a need to control a View's access based on the current user's permissions within the current group. This seems like something that would be useful to others as well. I have attached a patch that implements this plugin.
Comment | File | Size | Author |
---|---|---|---|
#2 | og-views-access-plugin-1287430-2.patch | 3.24 KB | BassistJimmyJam |
og-views-access-plugin.patch | 3.02 KB | BassistJimmyJam | |
Comments
Comment #1
amitaibuThanks.
The access plugin should belong to "OG context" module.
Title should be in lower case except of first letter.
I don't think we need this. We can just write "edit group"
Remove this comment.
Missing PHPdocs here and other functions.
Why is this needed?
Better: 'OG permission'
Place all in one line.
You can remove the "Note that..." part.
Comment #2
BassistJimmyJam CreditAttribution: BassistJimmyJam commentedI made the requested changes and have attached a new patch.
Comment #3
nagiek CreditAttribution: nagiek commented+1 in a big way.
Will it always be necessary to use a context? Could it ever be done using a passed-in group ID (or even an entity ID, wow!)?
Comment #4
amitaibuCommitted, thanks.
Comment #5
amitaibuHaving problem with git push. Will mark fixed after push.
Comment #6
amitaibudone