Fix admin first setup, email and password in README
This commit is contained in:
parent
628211f0fc
commit
f6e60823a7
3 changed files with 7 additions and 3 deletions
|
|
@ -77,13 +77,14 @@ bundle exec rake db:seed
|
||||||
|
|
||||||
7. Connect to osem.example.org and register your first user. Make also sure that Postfix is installed and configured on the system for the confirmation mail to pass through.
|
7. Connect to osem.example.org and register your first user. Make also sure that Postfix is installed and configured on the system for the confirmation mail to pass through.
|
||||||
|
|
||||||
8. To make the first registered user an admin:
|
<!-- 8. To make the first registered user an admin:
|
||||||
```
|
```
|
||||||
rails console
|
rails console
|
||||||
User.all
|
User.all
|
||||||
me = User.find('1')
|
me = User.find('1')
|
||||||
me.role_ids=[3]
|
me.role_ids=[3]
|
||||||
```
|
``` -->
|
||||||
|
8. Login as Admin with email:admin@opensuse.org and password:admin1234
|
||||||
|
|
||||||
Caveats
|
Caveats
|
||||||
=======
|
=======
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ class User < ActiveRecord::Base
|
||||||
has_and_belongs_to_many :roles
|
has_and_belongs_to_many :roles
|
||||||
has_one :person, :inverse_of => :user
|
has_one :person, :inverse_of => :user
|
||||||
|
|
||||||
attr_accessible :email, :password, :password_confirmation, :remember_me, :role_id, :role_ids, :person_attributes
|
attr_accessible :email, :password, :password_confirmation, :remember_me, :role_id, :role_ids, :person_attributes,:confirmed_at
|
||||||
accepts_nested_attributes_for :person
|
accepts_nested_attributes_for :person
|
||||||
accepts_nested_attributes_for :roles
|
accepts_nested_attributes_for :roles
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,9 @@ Role.create(:name => "Participant")
|
||||||
Role.create(:name => "Organizer")
|
Role.create(:name => "Organizer")
|
||||||
Role.create(:name => "Admin")
|
Role.create(:name => "Admin")
|
||||||
|
|
||||||
|
#For first admin setup
|
||||||
|
User.create(email:"admin@opensuse.org", password:"admin1234", password_confirmation:"admin1234",role_ids:[3],confirmed_at:Time.now)
|
||||||
|
|
||||||
qtype_yesno = QuestionType.create(:title => "Yes/No")
|
qtype_yesno = QuestionType.create(:title => "Yes/No")
|
||||||
qtype_single = QuestionType.create(:title => "Single Choice")
|
qtype_single = QuestionType.create(:title => "Single Choice")
|
||||||
qtype_multiple = QuestionType.create(:title => "Multiple Choice")
|
qtype_multiple = QuestionType.create(:title => "Multiple Choice")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue