def global_settings_page(): if request.method == "POST": # -- Add user returns a dict with action/result/reason keys. result = UsrMgmt.add_new_user(request.form, current_user.user_email) return jsonify(result) logs = AppManager.get_application_logs(current_user.user_email) return render_template("settings/GlobalSettings.html", logs=logs)
def global_settings_page(): if request.method == "POST": # -- Add user returns a dict with action/result/reason keys. result = UsrMgmt.add_new_user(request.form, current_user.user_email) return jsonify(result) # Getting server & user logs, reversing for newest first. logs = AppManager.get_application_logs(current_user.user_email) logs.reverse() user_list = UsrMgmt.get_users_state(current_user.user_email) # Removing our own user as to not present a self-disabling option. for index, user in enumerate(user_list): if user['user_email'] == current_user.user_email: del user_list[index] return render_template("settings/GlobalSettings.html", logs=logs, users=user_list)