mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
fix: allow users.update.phone and users.update.mfa events
These events are already emitted by the Users and Account APIs but were missing from the public events allowlist, so webhooks/functions could not subscribe to them via the validator or console picker. Fixes #8570 Co-authored-by: Chirag Aggarwal <chiragaggarwal5k@gmail.com>
This commit is contained in:
1 parent
5bc37d2933
commit
ec7c17ae40
3 files changed
+10
No files matched your search
@@ -89,6 +89,12 @@ return [
|
||||
'prefs' => [
|
||||
'$description' => 'This event triggers when a user\'s preferences is updated.',
|
||||
],
|
||||
'phone' => [
|
||||
'$description' => 'This event triggers when a user\'s phone number is updated.',
|
||||
],
|
||||
'mfa' => [
|
||||
'$description' => 'This event triggers when a user\'s MFA configuration is updated.',
|
||||
],
|
||||
]
|
||||
],
|
||||
'databases' => [
|
||||
|
||||
@@ -29,6 +29,8 @@ final class EventValidatorTest extends TestCase
|
||||
$this->assertTrue($this->object->isValid('users.torsten.update'));
|
||||
$this->assertTrue($this->object->isValid('users.torsten'));
|
||||
$this->assertTrue($this->object->isValid('users.*.update.email'));
|
||||
$this->assertTrue($this->object->isValid('users.*.update.phone'));
|
||||
$this->assertTrue($this->object->isValid('users.*.update.mfa'));
|
||||
$this->assertTrue($this->object->isValid('users.*.update'));
|
||||
$this->assertTrue($this->object->isValid('users.*'));
|
||||
$this->assertTrue($this->object->isValid('databases.books.tables.chapters.rows.prolog.create'));
|
||||
|
||||
@@ -29,6 +29,8 @@ final class FunctionEventValidatorTest extends TestCase
|
||||
$this->assertTrue($this->object->isValid('users.torsten.update'));
|
||||
$this->assertTrue($this->object->isValid('users.torsten'));
|
||||
$this->assertTrue($this->object->isValid('users.*.update.email'));
|
||||
$this->assertTrue($this->object->isValid('users.*.update.phone'));
|
||||
$this->assertTrue($this->object->isValid('users.*.update.mfa'));
|
||||
$this->assertTrue($this->object->isValid('users.*.update'));
|
||||
$this->assertTrue($this->object->isValid('users.*'));
|
||||
$this->assertTrue($this->object->isValid('databases.books.tables.chapters.rows.prolog.create'));
|
||||
|
||||
Reference in new issue
Block a user