Questions regarding a "Don't ask again" option for a Password Confirmation Modal...

Hi, I want for there to be a way for users to have the option to select "don't ask again" whenever a Password Confirmation Modal pops up before having to perform a chosen action that is important or destructive in a way. I figured it would be best to have this as a setting in a settings page as well for them to be able to turn it on or off as they like. What would be the correct route to go about doing this? Should it be an option that is configured in my plugin's configuration file, should it be a true or false value stored in the database for actual users of the application? Or both? Or is there a better way you can think of?
6 Replies
awcodes
awcodes16mo ago
You could do both, but I would definitely do it per user.
Andrew Wallo
Andrew Wallo16mo ago
So like store it in database?
awcodes
awcodes16mo ago
Yea. Set up a user settings table and just create a relationship Could even do the setting as a key/value json column
Andrew Wallo
Andrew Wallo16mo ago
Alright will do... I guess the only way for their option to be stored and configured is by storing in database right?
awcodes
awcodes16mo ago
That way you could add more as needed It doesn’t have to be in the database, just makes it easier to maintain the relationship. You could store it in browser storage but that falls apart if they access the app on different devices. At least without a PWA.
Andrew Wallo
Andrew Wallo16mo ago
Okay thank you!