From 1fdf65c850518a60ee8fadabc7e7e227bb21c618 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Fri, 2 Nov 2018 05:36:08 +0100 Subject: [PATCH] Don't automatically login on first run. --- etc/vmmgr/config.default.json | 1 - usr/lib/python3.6/vmmgr/wsgiapp.py | 10 +--------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/etc/vmmgr/config.default.json b/etc/vmmgr/config.default.json index 2c11b70..d6bc176 100644 --- a/etc/vmmgr/config.default.json +++ b/etc/vmmgr/config.default.json @@ -7,7 +7,6 @@ "host": { "adminpwd": "${ADMINPWD}", "domain": "spotter.vm", - "firstrun": true, "port": "443" }, "packages": {}, diff --git a/usr/lib/python3.6/vmmgr/wsgiapp.py b/usr/lib/python3.6/vmmgr/wsgiapp.py index 79a684e..4695247 100644 --- a/usr/lib/python3.6/vmmgr/wsgiapp.py +++ b/usr/lib/python3.6/vmmgr/wsgiapp.py @@ -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)