Skip to content
Snippets Groups Projects
Commit d6ff973d authored by Nick Valladares's avatar Nick Valladares Committed by Krish Moodbidri
Browse files

Removed indexing from index function

parent 422da996
No related branches found
No related tags found
No related merge requests found
......@@ -28,12 +28,12 @@ def create_app(config_name):
print(username, name, return_url, file=sys.stdout)
# Deliver arguments to script.
tempString = 'ssh ohpc "sudo /opt/ohpc_user_create/user_create ' + username + ' \'' + name + '\'"'
tempString = 'echo ssh ohpc "sudo /opt/ohpc_user_create/user_create ' + username + ' \'' + name + '\'"'
print(tempString, file=sys.stdout)
output = subprocess.check_output([tempString], shell=True)
print(output.split('\n')[7], file=sys.stdout)
print(output.split('\n'), file=sys.stdout)
return redirect(return_url, 302)
......@@ -45,8 +45,8 @@ def create_app(config_name):
if request.method == 'GET':
global return_url
return_url = request.args.get("redir")[0] or "/pun/sys/dashboard"
if "redir" in request.args:
return_url = request.args.get("redir") or "/pun/sys/dashboard"
return render_template("auth/SignUp.html", user=user)
......@@ -61,6 +61,10 @@ def create_app(config_name):
else:
return render_template("auth/SignUp.html", user=user)
with app.test_request_context(
'/', environ_base={'REMOTE_USER': 'short'}):
pass
@app.errorhandler(403)
def forbidden(error):
return render_template('errors/403.html', title='Forbidden'), 403
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment