]> git.ipfire.org Git - ipfire.org.git/commitdiff
people: Show stats only to staff
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 22 Nov 2019 10:48:21 +0000 (10:48 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 22 Nov 2019 10:48:21 +0000 (10:48 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/web/people.py

index 1bd146d5b7b9b2e98149e90352e86ba7e85e257e..13d0617fbc6b7daaff212623a590d185bdb19806 100644 (file)
@@ -224,6 +224,10 @@ class SearchHandler(auth.CacheMixin, base.BaseHandler):
 class StatsHandler(auth.CacheMixin, base.BaseHandler):
        @tornado.web.authenticated
        def get(self):
+               # Only staff can see stats
+               if not self.current_user.is_staff():
+                       raise tornado.web.HTTPError(403)
+
                self.render("people/stats.html")