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

feat(webhooks): Add support for a userid filter #46076

Merged
merged 6 commits into from
Jul 2, 2024

Conversation

come-nc
Copy link
Contributor

@come-nc come-nc commented Jun 24, 2024

Summary

This allows to register a userId to filter on along with the webhooks. This webhook will then only be triggered if the given userId is the one in session. This is more efficient than filtering by user in the event filter because the listener is not even registered if the user id does not match.

Checklist

@come-nc come-nc added the 2. developing Work in progress label Jun 24, 2024
@come-nc come-nc added this to the Nextcloud 30 milestone Jun 24, 2024
@come-nc come-nc self-assigned this Jun 24, 2024
@come-nc come-nc marked this pull request as ready for review June 24, 2024 14:56
@come-nc come-nc added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jun 24, 2024
@come-nc
Copy link
Contributor Author

come-nc commented Jun 24, 2024

I did not test it in real conditions yet, but code is ready for review.

@come-nc come-nc force-pushed the enh/webhooks-user-id-filter branch from 2eda7ed to ea1b788 Compare July 2, 2024 08:08
This allows to register a userId to filter on along with the webhooks.
This webhook will then only be triggered if the given userId is the one
in session. This is more efficient than filtering by user in the event
filter because the listener is not even registered if the user id does
not match.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Empty string and null are the same thing on oracle databases so we have
 to allow it.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc come-nc force-pushed the enh/webhooks-user-id-filter branch from ea1b788 to 7c577c9 Compare July 2, 2024 09:24
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc come-nc merged commit 8469904 into master Jul 2, 2024
165 checks passed
@come-nc come-nc deleted the enh/webhooks-user-id-filter branch July 2, 2024 14:29
@blizzz blizzz mentioned this pull request Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants