Design Issue Here's the deal.
I work at a store, and that store has products. I made a program to test the user on those products.
However, I have no database. I am working with simple text files. Therefore, my entire product list resides in a text file. I want to enable superusers to be able to add,edit,delete products, whereas I only want general users to be able to test on them. However, Im not quite sure how to enforce this.
I do have a couple ideas:
1)Make a second, seperate program to add, edit, and delete products.
New products will not be shown in the testing program until it is restarted.
The add,edit,delete program would need password protection.
2)Create a sperate, password protected form in the main program. The same effect is created, but still only one single program.
How would you do it if you were me?
Either way though, Im not sure how to password protect this. Sure I could make a pwd.txt file, and encrypt a password into it, thus preventing unauthorized access. However, there would be nothing to stop a user from deleting the pwd.txt file altoghether, or editing it so that no one may access the program.
I guess this also ties in with another question. Since my data is all in text files, is there ANY way that I can protect it from being edited or deleted? Im guessing no, but if there is Id like to know. |