Set UserStatistics route to be admins_only (#1276)

* Set UserStatistics route to be admins_only
bulk-clear-sessions
Kevin Chung 2020-03-04 01:08:13 -05:00 committed by GitHub
parent 1e86718232
commit ae1c2ec50d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -8,6 +8,7 @@ from CTFd.utils.decorators import admins_only
@statistics_namespace.route("/users")
class UserStatistics(Resource):
@admins_only
def get(self):
registered = Users.query.count()
confirmed = Users.query.filter_by(verified=True).count()