diff options
Diffstat (limited to 'run.py')
-rwxr-xr-x | run.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1,5 +1,5 @@ #!/usr/bin/env python -from flask import Flask, send_from_directory, render_template, url_for +from flask import Flask, send_from_directory, render_template, session, abort from flask_kerberos import init_kerberos, requires_authentication from classes import Network, Channel, Log from urllib.parse import quote_plus @@ -98,5 +98,11 @@ def login(principal): Logged in! <a href="/">index</a> ''' +def authenticated(): + if not session.get('logged_in'): + abort(401) + else: + return True + if __name__ == '__main__': app.run(port=app.config['PORT']) |