Compare commits
No commits in common. "941261c830ed5a4191731b3ea48629e68202ad0b" and "98c77bf71904796a3ebb8c01e39f4a859a67f80d" have entirely different histories.
941261c830
...
98c77bf719
|
@ -1,7 +1,6 @@
|
|||
from os import environ
|
||||
from os.path import isfile
|
||||
from configobj import ConfigObj
|
||||
from uuid import uuid4
|
||||
|
||||
|
||||
CONFIG_FILE = environ.get('CONFIG_FILE', '/etc/risotto/risotto.conf')
|
||||
|
@ -89,28 +88,6 @@ if 'IMAGE_PATH' in environ:
|
|||
IMAGE_PATH = environ['IMAGE_PATH']
|
||||
else:
|
||||
IMAGE_PATH = config.get('IMAGE_PATH', '/tmp')
|
||||
if 'PASSWORD_ADMIN_USERNAME' in environ:
|
||||
PASSWORD_ADMIN_USERNAME = environ['PASSWORD_ADMIN_USERNAME']
|
||||
else:
|
||||
PASSWORD_ADMIN_USERNAME = config.get('PASSWORD_ADMIN_USERNAME', 'risotto')
|
||||
if 'PASSWORD_ADMIN_EMAIL' in environ:
|
||||
PASSWORD_ADMIN_EMAIL = environ['PASSWORD_ADMIN_EMAIL']
|
||||
else:
|
||||
# this parameter is mandatory
|
||||
PASSWORD_ADMIN_EMAIL = config['PASSWORD_ADMIN_EMAIL']
|
||||
if 'PASSWORD_ADMIN_PASSWORD' in environ:
|
||||
PASSWORD_ADMIN_PASSWORD = environ['PASSWORD_ADMIN_PASSWORD']
|
||||
else:
|
||||
# this parameter is mandatory
|
||||
PASSWORD_ADMIN_PASSWORD = config['PASSWORD_ADMIN_PASSWORD']
|
||||
if 'PASSWORD_DEVICE_IDENTIFIER' in environ:
|
||||
PASSWORD_DEVICE_IDENTIFIER = environ['PASSWORD_DEVICE_IDENTIFIER']
|
||||
else:
|
||||
PASSWORD_DEVICE_IDENTIFIER = config.get('PASSWORD_DEVICE_IDENTIFIER', uuid4())
|
||||
if 'PASSWORD_URL' in environ:
|
||||
PASSWORD_URL = environ['PASSWORD_URL']
|
||||
else:
|
||||
PASSWORD_URL = config.get('PASSWORD_URL', 'https://localhost:8001/')
|
||||
|
||||
|
||||
def dsn_factory(database, user, password, address=DB_ADDRESS):
|
||||
|
@ -133,12 +110,6 @@ _config = {'database': {'dsn': dsn_factory(RISOTTO_DB_NAME, RISOTTO_DB_USER, RIS
|
|||
'sql_dir': SQL_DIR,
|
||||
'tmp_dir': TMP_DIR,
|
||||
},
|
||||
'password': {'admin_username': PASSWORD_ADMIN_USERNAME,
|
||||
'admin_email': PASSWORD_ADMIN_EMAIL,
|
||||
'admin_password': PASSWORD_ADMIN_PASSWORD,
|
||||
'device_identifier': PASSWORD_DEVICE_IDENTIFIER,
|
||||
'service_url': PASSWORD_URL,
|
||||
},
|
||||
'cache': {'root_path': CACHE_ROOT_PATH},
|
||||
'servermodel': {'internal_source_path': SRV_SEED_PATH,
|
||||
'internal_source': 'internal'},
|
||||
|
|
|
@ -349,7 +349,7 @@ class Dispatcher(register.RegisterDispatcher,
|
|||
sql = '''
|
||||
SELECT UserId
|
||||
FROM UserUser
|
||||
WHERE Login = $1
|
||||
WHERE UserLogin = $1
|
||||
'''
|
||||
user_id = await connection.fetchval(sql,
|
||||
user_login)
|
||||
|
|
Loading…
Reference in New Issue