diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-06-24 16:19:03 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-07-02 11:24:33 +0200 |
commit | 44d707c97b54ed3b2ae352f6ddfa8caa213e27e8 (patch) | |
tree | b556ab63123b52224754158f1cdb881a733501ef /apps/webhook_listeners/tests | |
parent | 164f4a3ea3a3ae8f8adc05b766782f49d7e69832 (diff) | |
download | nextcloud-server-44d707c97b54ed3b2ae352f6ddfa8caa213e27e8.tar.gz nextcloud-server-44d707c97b54ed3b2ae352f6ddfa8caa213e27e8.zip |
feat(webhooks): Add support for a userid filter
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>
Diffstat (limited to 'apps/webhook_listeners/tests')
-rw-r--r-- | apps/webhook_listeners/tests/Db/WebhookListenerMapperTest.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/webhook_listeners/tests/Db/WebhookListenerMapperTest.php b/apps/webhook_listeners/tests/Db/WebhookListenerMapperTest.php index fc42a0a9597..327d5740077 100644 --- a/apps/webhook_listeners/tests/Db/WebhookListenerMapperTest.php +++ b/apps/webhook_listeners/tests/Db/WebhookListenerMapperTest.php @@ -58,6 +58,7 @@ class WebhookListenerMapperTest extends TestCase { UserCreatedEvent::class, null, null, + null, AuthMethod::None, null, ); @@ -72,6 +73,7 @@ class WebhookListenerMapperTest extends TestCase { NodeWrittenEvent::class, null, null, + null, AuthMethod::None, null, ); @@ -92,6 +94,7 @@ class WebhookListenerMapperTest extends TestCase { NodeWrittenEvent::class, null, null, + null, AuthMethod::None, null, ); @@ -111,6 +114,7 @@ class WebhookListenerMapperTest extends TestCase { NodeWrittenEvent::class, null, null, + null, AuthMethod::Header, ['secretHeader' => 'header'], ); |