From 47b66f3f373f0005257e1813790c22478cf062fb Mon Sep 17 00:00:00 2001 From: kikito Date: Wed, 2 Sep 2015 17:25:12 +0200 Subject: [PATCH] creates admin user in db/seeds --- db/seeds.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/db/seeds.rb b/db/seeds.rb index 600808d1b..78d873c53 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -1,3 +1,7 @@ +# Default admin user (change password after first deploy to a server!) +admin = User.create!(username: 'admin', email: 'admin@madrid.es', password: '12345678', password_confirmation: '12345678', confirmed_at: Time.now) +admin.create_administrator + # Names for the moderation console, as a hint for moderators # to know better how to assign users with official positions Setting.create(key: 'official_level_1_name', value: 'Empleados públicos') @@ -7,4 +11,4 @@ Setting.create(key: 'official_level_4_name', value: 'Concejales') Setting.create(key: 'official_level_5_name', value: 'Alcaldesa') # Max percentage of allowed anonymous votes on a debate -Setting.create(key: 'max_ratio_anon_votes_on_debates', value: '50') \ No newline at end of file +Setting.create(key: 'max_ratio_anon_votes_on_debates', value: '50')