moloch-- / RootTheBox

A Game of Hackers (CTF Scoreboard & Game Manager)
http://root-the-box.com/
Apache License 2.0
915 stars 292 forks source link

Have an option to clear out teams and users when resetting game #526

Closed PJNorrisS1 closed 1 year ago

PJNorrisS1 commented 1 year ago

Is is possible to have a checkbox on this screen: image that will delete all player names and team names? Please?

eljeffeg commented 1 year ago

Option added

PJNorrisS1 commented 1 year ago

Legend! Thank you - much needed!

PJNorrisS1 commented 1 year ago

Just tested - getting this up: image I have tested it with game stopped, registration open and one user registered, with two administrator accounts registered. On that note, I assume the admin accounts will remain or will they be nuked too?

PJNorrisS1 commented 1 year ago

Also tried reset game - image

eljeffeg commented 1 year ago

Admin accounts will remain. Do you see any error in the logs?

eljeffeg commented 1 year ago

Pushed a fix I hope - I had tried to persist the admin's session since I clear the memcached after the reset to kick off all users. However, I guess that caused an issue. So the admin will have to log back in after the reset.

PJNorrisS1 commented 1 year ago

Yup that fixed it! Nice one. Just one observation though... as this is a one way action with no undo button, I would perhaps suggest we have a confirmation box come up - Are you sure you want to RESET / Delete Game? and have the user enter a physical word in. As I said, there is no undo button :-). If not a physical word, perhaps just a yes no button? :-)

eljeffeg commented 1 year ago

I tend to find over-proofing annoying, so I just added a confirmation yes no. If you go through the process to click the reset page, click the reset button, then click confirm - that's on you. lol

PJNorrisS1 commented 1 year ago

Ha brilliant! Thank you. Tend to agree, but we also have ‘dumb’ users too – “problem between keyboard and chair” type people

From: ElJeffe @.> Date: Wednesday, 26 October 2022 at 13:53 To: moloch--/RootTheBox @.> Cc: PJ Norris @.>, Author @.> Subject: [EXT.MSG] Re: [moloch--/RootTheBox] Have an option to clear out teams and users when resetting game (Issue #526)

I tend to find over-proofing annoying, so I just added a confirmation yes no. If you go through the process to click the reset page, click the reset button, then click confirm - that's on you. lol

— Reply to this email directly, view it on GitHubhttps://github.com/moloch--/RootTheBox/issues/526#issuecomment-1291989721, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AZNZST5NLK3MMGNRQWKHFKLWFESWJANCNFSM6AAAAAARLSCN2E. You are receiving this because you authored the thread.Message ID: @.***>