Compare commits

..

2 commits

Author SHA1 Message Date
Jörg Thalheim 1789416df4 register-new-matrix-user: add a flag to ignore already existing users
This allows to register users in a more declarative and stateless way.

Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
2024-06-14 11:23:46 +02:00
Jörg Thalheim bc199a27f2 register_new_matrix_user: add password-file flag
getpass in python expects stdin to be a tty, hence we cannot just pipe
into register_new_matrix_user. --password-file instead works better and
it would also allow the use of stdin if /dev/stdin is passed.

Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
2024-06-14 11:20:48 +02:00

View file

@ -299,15 +299,7 @@ def main() -> None:
if args.admin or args.no_admin:
admin = args.admin
register_new_user(
args.user,
password,
server_url,
secret,
admin,
args.user_type,
args.exists_ok,
)
register_new_user(args.user, password, server_url, secret, admin, args.user_type, exists_ok=args.exists_ok)
def _read_file(file_path: Any, config_path: str) -> str: