summaryrefslogtreecommitdiffstats
path: root/at.py
diff options
context:
space:
mode:
Diffstat (limited to 'at.py')
-rw-r--r--at.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/at.py b/at.py
index 05d78a0..6839c60 100644
--- a/at.py
+++ b/at.py
@@ -15,7 +15,7 @@ from time import sleep, time, mktime
from collections import namedtuple
from urllib import urlencode
-from spaceauth import SpaceAuth, login_required, current_user
+from spaceauth import SpaceAuth, login_required, current_user, cap_required
app = Flask('at')
app.config.from_pyfile('at.cfg')
@@ -356,6 +356,13 @@ def device(id, action):
return redirect(url_for('account'))
+@app.route('/admin')
+@cap_required('staff')
+def admin():
+ data = now_at()
+ return render_template('admin.html', data=data)
+
+
@app.before_first_request
def setup():
updater = DhcpdUpdater(app.config['LEASE_FILE'], app.config['TIMEOUT'],