diff --git a/owrx/users.py b/owrx/users.py index 86173e1..03a5372 100644 --- a/owrx/users.py +++ b/owrx/users.py @@ -48,6 +48,9 @@ class CleartextPassword(Password): } +DefaultPasswordClass = CleartextPassword + + class User(object): def __init__(self, name: str, enabled: bool, password: Password): self.name = name diff --git a/owrxadmin/commands.py b/owrxadmin/commands.py index bf2f1b8..8be9d5a 100644 --- a/owrxadmin/commands.py +++ b/owrxadmin/commands.py @@ -1,6 +1,6 @@ from abc import ABC, ABCMeta, abstractmethod from getpass import getpass -from owrx.users import UserList, User, CleartextPassword +from owrx.users import UserList, User, DefaultPasswordClass import sys import random import string @@ -44,7 +44,7 @@ class NewUser(UserCommand): print("Creating user {username}...".format(username=username)) userList = UserList() - user = User(name=username, enabled=True, password=CleartextPassword(password)) + user = User(name=username, enabled=True, password=DefaultPasswordClass(password)) userList.addUser(user) def getRandomPassword(self, length=10):