events: Change format of authentication_methods realm_update_dict event.

Makes the event in line with state_data.realm_authentication_methods.
This commit is contained in:
Mateusz Mandera
2024-02-16 00:56:08 +01:00
committed by Tim Abbott
parent da9e4e6e54
commit 1ede8da46c
6 changed files with 66 additions and 62 deletions

View File

@@ -965,13 +965,23 @@ def check_realm_default_update(
assert isinstance(event["value"], prop_type)
authentication_method_dict = DictType(
required_keys=[
("enabled", bool),
("available", bool),
],
optional_keys=[
("unavailable_reason", str),
],
)
authentication_dict = DictType(
required_keys=[
("Google", bool),
("Dev", bool),
("LDAP", bool),
("GitHub", bool),
("Email", bool),
("Google", authentication_method_dict),
("Dev", authentication_method_dict),
("LDAP", authentication_method_dict),
("GitHub", authentication_method_dict),
("Email", authentication_method_dict),
]
)