refactor: Make acting_user a mandatory kwarg for do_set_realm_authentication_methods.

This commit is contained in:
shanukun
2021-03-07 10:30:29 +05:30
committed by Tim Abbott
parent c95061e9b9
commit 4dc62f962b
3 changed files with 5 additions and 3 deletions

View File

@@ -321,7 +321,9 @@ field and send an event. For example:
# zerver/lib/actions.py
def do_set_realm_authentication_methods(realm: Realm, authentication_methods: Dict[str, bool]) -> None:
def do_set_realm_authentication_methods(
realm: Realm, authentication_methods: Dict[str, bool], *, acting_user: Optional[UserProfile]
) -> None:
for key, value in list(authentication_methods.items()):
index = getattr(realm.authentication_methods, key).number
realm.authentication_methods.set_bit(index, int(value))