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