Whenever a user visits the homepage, I need to verify that default values on the database are in place (if this is not the correct location for the check, please advise). Here's what needs to happen:
- Determine if the database is empty (if not, skip steps 2 and 3)
- Disable access to the entire page
- Populate the database with default values
- If successful, re-enable page access
I am unsure about step 1 (where to perform the check), step 2 (actions needed), and step 4 (effective disabling and enabling of the page)