diff --git a/user_managment/app.py b/user_managment/app.py index db86fe5..c3a5039 100644 --- a/user_managment/app.py +++ b/user_managment/app.py @@ -258,7 +258,7 @@ def create_app(): ''' elif i[1] == 0: content = content + '''\n

Your passphrase for ''' + str(i[0]) + ''':

-

Using legacy authentication. Contact server admin for passphrase.

+

''' + legacy_passphrase + '''

 

''' else: content = content + '''\n

Your passphrase for ''' + str(i[0]) + ''':

@@ -427,14 +427,18 @@ def create_app(): if authorized_peer(dmr_id)[1] == '': passphrase = gen_passphrase(dmr_id) - if authorized_peer(dmr_id)[1] != '' or authorized_peer(dmr_id)[1] != 0: + elif authorized_peer(dmr_id)[1] == 0: + passphrase = legacy_passphrase + elif authorized_peer(dmr_id)[1] != '' or authorized_peer(dmr_id)[1] != 0: passphrase = authorized_peer(dmr_id)[1] #try: - if dmr_id in script_links and number == float(script_links[dmr_id]): - script_links.pop(dmr_id) - return str(gen_script(dmr_id, passphrase)) + if dmr_id in script_links and number == float(script_links[dmr_id]): + script_links.pop(dmr_id) + return str(gen_script(dmr_id, passphrase)) #except: + #else: #content = 'Link used or other error.' + #return content #return render_template('flask_user_layout.html', markup_content = content, logo = logo) diff --git a/user_managment/config-SAMPLE.py b/user_managment/config-SAMPLE.py index 323c4c8..fb2244b 100644 --- a/user_managment/config-SAMPLE.py +++ b/user_managment/config-SAMPLE.py @@ -2,6 +2,12 @@ ''' Settings for user management portal. ''' +# Database location +db_location = 'sqlite:///./users.db' + +# Legacy passphrase used in hblink.cfg +legacy_passphrase = 'passw0rd' + # Title of the Dashboard title = 'MMDVM User Portal'