Commit d6ff973d authored by Nick Valladares's avatar Nick Valladares Committed by Krish Moodbidri
Browse files

Removed indexing from index function

parent 422da996
...@@ -28,12 +28,12 @@ def create_app(config_name): ...@@ -28,12 +28,12 @@ def create_app(config_name):
print(username, name, return_url, file=sys.stdout) print(username, name, return_url, file=sys.stdout)
# Deliver arguments to script. # 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) print(tempString, file=sys.stdout)
output = subprocess.check_output([tempString], shell=True) 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) return redirect(return_url, 302)
...@@ -45,8 +45,8 @@ def create_app(config_name): ...@@ -45,8 +45,8 @@ def create_app(config_name):
if request.method == 'GET': if request.method == 'GET':
global return_url global return_url
if "redir" in request.args:
return_url = request.args.get("redir")[0] or "/pun/sys/dashboard" return_url = request.args.get("redir") or "/pun/sys/dashboard"
return render_template("auth/SignUp.html", user=user) return render_template("auth/SignUp.html", user=user)
...@@ -61,6 +61,10 @@ def create_app(config_name): ...@@ -61,6 +61,10 @@ def create_app(config_name):
else: else:
return render_template("auth/SignUp.html", user=user) return render_template("auth/SignUp.html", user=user)
with app.test_request_context(
'/', environ_base={'REMOTE_USER': 'short'}):
pass
@app.errorhandler(403) @app.errorhandler(403)
def forbidden(error): def forbidden(error):
return render_template('errors/403.html', title='Forbidden'), 403 return render_template('errors/403.html', title='Forbidden'), 403
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment