diff --git a/user_managment/app.py b/user_managment/app.py index 1c1d656..46e5586 100644 --- a/user_managment/app.py +++ b/user_managment/app.py @@ -57,9 +57,9 @@ def convert_nato(string): 'M': 'MIKE', 'N': 'NOVEMBER','O': 'OSCAR', 'P': 'PAPA', 'Q': 'QUEBEC', 'R': 'ROMEO', 'S': 'SIERRA', 'T': 'TANGO', 'U': 'UNIFORM', 'V': 'VICTOR', 'W': 'WHISKEY', 'X': 'X-RAY', - 'Y': 'YANKEE', 'Z': 'ZULU', '0': 'zero', '1': 'one', - '2': 'two', '3': 'three', '4': 'four', '5': 'five', - '6': 'six', '7': 'seven', '8': 'eight', '9': 'nine', + 'Y': 'YANKEE', 'Z': 'ZULU', '0': 'zero(0)', '1': 'one(1)', + '2': 'two(2)', '3': 'three(3)', '4': 'four(4)', '5': 'five(5)', + '6': 'six(6)', '7': 'seven(7)', '8': 'eight(8)', '9': 'nine(9)', 'a': 'alpha', 'b': 'bravo', 'c': 'charlie', 'd': 'delta', 'e': 'echo', 'f': 'foxtrot', 'g': 'golf', 'h': 'hotel', 'i': 'india', 'j': 'juliett','k': 'kilo', 'l': 'lima', @@ -207,7 +207,7 @@ def create_app(): ##
## {% endblock %} ## """) - return render_template('index.html', markup_content = content, logo = logo) + return render_template('index.html', markup_content = content) @app.route('/generate_passphrase/pi-star', methods = ['GET']) @login_required @@ -257,7 +257,7 @@ def create_app(): #return str(content) - return render_template('flask_user_layout.html', markup_content = Markup(content), logo = logo) + return render_template('flask_user_layout.html', markup_content = Markup(content)) @@ -280,7 +280,7 @@ def create_app(): if i[1] == '': link_num = str(random.randint(1,99999999)).zfill(8) + str(time.time()) + str(random.randint(1,99999999)).zfill(8) script_links[i[0]] = link_num - print(script_links) + #print(script_links) content = content + '''\n- |
-''' - - - return render_template('generic.html', title = title, url = url, logo = logo, content = Markup(content)) - -@app.route('/auth', methods=['POST']) -def auth(): - hblink_req = request.json - print((hblink_req)) - print(auth_dict) - if hblink_req['secret'] in shared_secrets: - if hblink_req['id'] in auth_dict: - if auth_dict[hblink_req['id']] == 0: - response = jsonify( - allow=True, - mode='legacy', - ) - elif auth_dict[hblink_req['id']] == '': - # normal - response = jsonify( - allow=True, - mode='normal', - ) - elif auth_dict[hblink_req['id']] != '' or auth_dict[hblink_req['id']] != 0: - response = jsonify( - allow=True, - mode='override', - value=auth_dict[hblink_req['id']] - ) - if hblink_req['id'] not in auth_dict: - response = jsonify( - allow=False) - else: - message = jsonify(message='Authentication error') - response = make_response(message, 401) - - return response - - -if __name__ == '__main__': - - app.run(debug = True, port=ums_port, host=ums_host) diff --git a/user_managment/config-SAMPLE.py b/user_managment/config-SAMPLE.py index ab1cfa7..14fdcac 100644 --- a/user_managment/config-SAMPLE.py +++ b/user_managment/config-SAMPLE.py @@ -13,8 +13,6 @@ use_short_passphrase = False # Title of the Dashboard title = 'MMDVM User Portal' -# Logo used on dashboard page -logo = 'https://github.com/HBLink-org/hblink3/raw/master/HBlink.png' # Port to run server ums_port = 8080 # IP to run server on diff --git a/user_managment/static/HBlink.png b/user_managment/static/HBlink.png new file mode 100644 index 0000000..29fa556 Binary files /dev/null and b/user_managment/static/HBlink.png differ diff --git a/user_managment/templates/flask_user_layout.html b/user_managment/templates/flask_user_layout.html index 052ae00..e84ec1f 100644 --- a/user_managment/templates/flask_user_layout.html +++ b/user_managment/templates/flask_user_layout.html @@ -31,7 +31,7 @@