Gizra / og

https://www.drupal.org/project/og
92 stars 133 forks source link

Feature Request: Create Views Access Plugin #410

Open cmcintosh opened 6 years ago

cmcintosh commented 6 years ago

Objective: To create a new views access plugin that will allow restricting access to the current view based on the User's membership and/or Organic Group permission.

Steps:

  1. We will need a way to set/check the currently active group we are checking against. This can be tricky as we may not know what argument will be the Group's id and/or how to detect the group type/bundle.

  2. Define the access handlers/access result based on the following:

    • A user is a member of the currently viewed Organic Group's audience
    • A user has X group permission based on the user's assigned group role.
cmcintosh commented 6 years ago

I have already done some work on this for another project and will be generating a PR to get this into the module as i can see it being something that could be useful for several folks.

heddn commented 6 years ago

See #300 for a portion of what you are requesting.