Closed amarkpark closed 8 years ago
Given this is an open source project, and this would run on production as well, I think creating an admin in the seeds file would make our production app insecure. Anyone who sees our code would be able to login as an admin, right?
I stole heavily from the Seed.rb file that @colinrubbert had up for the Lightening Talks, and his had admin users thus I put one in. As I understand it you have to run rake db:seed ishness to call the seed.rb to add the data to the database and it's something that you can do on demand and in just a DEV environment to quickly add data for testing. That is MY understanding, never having used it. Perhaps Colin can confirm my understanding of the Seed.rb functionality. In any case I am not in any way vested in the contents of this file or the merging of this PR, I just wanted to make it available and close my Issue. :-)
Talked about modifying this to be a rake task instead of using the seed file.
Small PR with a simple Seed.rb (that I am unable to test locally at this time due to some missing dependencies I need to sort out). Also removed a few blank lines from User.rb and added Nicola to the Readme.
I'm going to close related Issue https://github.com/FirehoseCommunity/DEFCON/issues/9 because at this point I believe it is complete or irrelevant, one of the two - users can now be created and here is the Seed data just in case someone wants it.