MCPcopy
hub / github.com/coleifer/sqlite-web / install_auth_handler

Function install_auth_handler

sqlite_web/sqlite_web.py:1571–1580  ·  view source on GitHub ↗
(password)

Source from the content-addressed store, hash-verified

1569 thread.start()
1570
1571def install_auth_handler(password):
1572 app.config['PASSWORD'] = password
1573
1574 @app.before_request
1575 def check_password():
1576 if not session.get('authorized') and request.path != '/login/' and \
1577 not request.path.startswith(('/static/', '/favicon')):
1578 flash('You must log-in to view the database browser.', 'danger')
1579 session['next_url'] = request.base_url
1580 return redirect(url_for('login'))
1581
1582def initialize_dataset(filename):
1583 dataset_kw = {}

Callers 1

initialize_appFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected