Add accessible membership requests views filter

Created on 27 January 2023, almost 2 years ago

Problem/Motivation

Normally views show all group content, regardless if the current user can do anything with them or not.
We had to create a view that'd allow site admins to see all membership requests they can manage but this piece of code was missing.

Not sure if it's the best solution so just sharing the Views filter code. Worked with 1.0.x but should be ok with the latest as well, maybe with one small change group_content -> group_relationship as it's detached.

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡΅πŸ‡±Poland Graber

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Graber
  • πŸ‡§πŸ‡ͺBelgium lobsterr

    @Graber I am bit confused, we provide access to the view based on "administer membership request". So, it means, if you have this permission you can handle group content of type "administer membership request". Why do we need an additional filter for it ?

    Or you want to show for admin of the side all requests from any groups and you want to show there only those, where this user has "administer membership request". Correct ?

  • πŸ‡΅πŸ‡±Poland Graber

    Yes, all. In such a case there’s no group in context.

Production build 0.71.5 2024