Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: add event to query builder #220

Open
alexdryden opened this issue Jun 3, 2024 · 2 comments
Open

Request: add event to query builder #220

alexdryden opened this issue Jun 3, 2024 · 2 comments

Comments

@alexdryden
Copy link

We use a module that frequently makes updates to the api's query builders to add in or process an additional parameters from the module. Because findResourcesFromPropertyIds doesn't go through the API, we aren't able to extend our module's functionality to this extremely useful feature. Is it possible to add an event that contains the querybuilder, similar to the events in the API after the query is built but before it is executed, e.g. here

@zerocrates
Copy link
Contributor

There could potentially be an event there...

What kind of thing are you actually trying to do that would involve changing how the resource lookup works?

@alexdryden
Copy link
Author

Hi @zerocrates! I'm on parental leave till around April but here is the best of my recollection:

The module I referenced creates "teams" that are bundles of users/resources/sites, and then it controls what users can do and see within each team where they are a member. It is similar to the WordPress multisite interface, if you are familiar with that, where a single user can belong to multiple WordPress sites inside the multisite installation and have different roles in each site.

What I would like to be able to do is to enforce those "team" boundaries within the findResourcesFromPropertyIds query so that only resources within a given team are returned. Elsewhere in the module I have been adding a left join on the resource results with the team's resources, and that was the pattern I envisioned using here.

If there is a better or easier way to implement I'm totally open to that as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants