diff --git a/CTFd/admin.py b/CTFd/admin.py index 1a3acbe7..8303e6da 100644 --- a/CTFd/admin.py +++ b/CTFd/admin.py @@ -286,6 +286,14 @@ def init_admin(app): db.session.commit() return redirect('/scoreboard') + @app.route('/admin/team//delete', methods=['POST']) + @admins_only + def delete_team(teamid): + user = Teams.query.filter_by(id=teamid).first() + db.session.delete(user) + db.session.commit() + return '1' + @app.route('/admin/graphs/') @admins_only diff --git a/templates/admin/teams.html b/templates/admin/teams.html index 0b1742ba..ece10440 100644 --- a/templates/admin/teams.html +++ b/templates/admin/teams.html @@ -5,8 +5,20 @@

+
+

Delete User

+
+ + +
+

Are you sure you want to delete ?

+ + +
+
+
-

Edit User

+

Edit User

@@ -97,7 +109,7 @@ {% block scripts %} {% endblock %} \ No newline at end of file