Skip to content

Conversation

YueqingZhuo
Copy link

First of all, I have to mention that I'm a beginner at open-issue...

Related issue:#57

image

My thought

To implement the functionality of resetting a counter to zero and effectively prevent malicious resetting, I introduced an authorization mechanism. The detailed idea is as follows:

While it's easy to simply add a button to reset the counter to zero, the key challenge lies in effectively preventing malicious users from resetting others' counters. To address this, I have assigned a unique password to each counter name and added a password modification function.

For newly created counter names, the default password is set to an empty string. When users need to modify the password, if the name has never been assigned a password before, they can directly modify the password or reset the counter without entering the old password.

However, I'm not sure if this design is truly necessary, or if there might be a more reasonable design to solve this problem.

Result

image

Note: This pull request has modifies the database structure by introducing a new password field.

@YueqingZhuo
Copy link
Author

If there are any good suggestions, I am open to making further modifications..............

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant