Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Krish Moodbidri
self-reg
Commits
d6ff973d
Commit
d6ff973d
authored
May 15, 2019
by
Nick Valladares
Committed by
Krish Moodbidri
Apr 24, 2020
Browse files
Removed indexing from index function
parent
422da996
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/__init__.py
View file @
d6ff973d
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment