Commit a1c9a10e46622305085b7433abd07205a71bf2ce
1 parent
93b7f433
Exists in
master
and in
1 other branch
- /admin requires professor '0'
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
serve.py
... | ... | @@ -79,7 +79,8 @@ class AdminWebService(object): |
79 | 79 | def __init__(self, app): |
80 | 80 | self.app = app |
81 | 81 | |
82 | - @cherrypy.tools.accept(media='application/json') | |
82 | + @cherrypy.tools.accept(media='application/json') # FIXME | |
83 | + @require(name_is('0')) | |
83 | 84 | def GET(self): |
84 | 85 | data = { |
85 | 86 | 'online': self.app.get_online_students(), |
... | ... | @@ -90,6 +91,7 @@ class AdminWebService(object): |
90 | 91 | # print(dict(data['finished'])) |
91 | 92 | return json.dumps(data, default=str) |
92 | 93 | |
94 | + @require(name_is('0')) | |
93 | 95 | def POST(self, **args): |
94 | 96 | # print('POST', args) # FIXME |
95 | 97 | if args['cmd'] == 'allow': | ... | ... |