Don't automatically login on first run.
This commit is contained in:
parent
7eaab3d6e2
commit
1fdf65c850
@ -7,7 +7,6 @@
|
|||||||
"host": {
|
"host": {
|
||||||
"adminpwd": "${ADMINPWD}",
|
"adminpwd": "${ADMINPWD}",
|
||||||
"domain": "spotter.vm",
|
"domain": "spotter.vm",
|
||||||
"firstrun": true,
|
|
||||||
"port": "443"
|
"port": "443"
|
||||||
},
|
},
|
||||||
"packages": {},
|
"packages": {},
|
||||||
|
@ -122,15 +122,7 @@ class WSGIApp(object):
|
|||||||
return redirect('/')
|
return redirect('/')
|
||||||
|
|
||||||
def portal_view(self, request):
|
def portal_view(self, request):
|
||||||
# Default portal view. If this is the first run, perform first-run setup.
|
# Default portal view.
|
||||||
if self.conf['host']['firstrun']:
|
|
||||||
# Set user as admin
|
|
||||||
request.session['admin'] = True
|
|
||||||
# Disable and save first-run flag
|
|
||||||
self.conf['host']['firstrun'] = False
|
|
||||||
self.conf.save()
|
|
||||||
# Redirect to host setup view
|
|
||||||
return redirect('/setup-host')
|
|
||||||
host = tools.compile_url(self.conf['host']['domain'], self.conf['host']['port'])[8:]
|
host = tools.compile_url(self.conf['host']['domain'], self.conf['host']['port'])[8:]
|
||||||
if request.session['admin']:
|
if request.session['admin']:
|
||||||
return self.render_template('portal-admin.html', request, host=host)
|
return self.render_template('portal-admin.html', request, host=host)
|
||||||
|
Loading…
Reference in New Issue
Block a user