Development
This commit is contained in:
parent
19be151c70
commit
f5722f3c7b
8 changed files with 178 additions and 90 deletions
|
|
@ -29,8 +29,11 @@ from pages.captiveportal.action import bp as captiveportal_bp
|
|||
from action_accountlogout import bp as accountlogout_bp
|
||||
from api_apply_health import bp as api_apply_health_bp
|
||||
|
||||
from session_interface import SqliteSessionInterface
|
||||
|
||||
app = Flask(__name__)
|
||||
app.secret_key = os.environ.get('SECRET_KEY', os.urandom(24))
|
||||
app.secret_key = os.environ.get('SECRET_KEY', os.urandom(24))
|
||||
app.session_interface = SqliteSessionInterface(config_utils.SESSIONS_DB)
|
||||
|
||||
# Static www/ serving =================================================
|
||||
|
||||
|
|
@ -77,9 +80,6 @@ def serve_view(page_name):
|
|||
|
||||
view_req = view_def.get('client_requirement')
|
||||
level = factory.client_level()
|
||||
sid = session.get('session_id', '')
|
||||
if sid and level > 0:
|
||||
config_utils.record_session_activity(sid)
|
||||
if not factory.passes(view_req, level):
|
||||
return redirect('/overview' if level > 0 else '/accountlogin')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue