2014-04-08 13:11:06 +02:00
|
|
|
# Create nessecary data to start with a fresh installation
|
|
|
|
|
|
|
|
# Create working group with full rights
|
|
|
|
administrators = Workgroup.create(
|
|
|
|
:name => "Administrators",
|
|
|
|
:description => "System administrators.",
|
|
|
|
:role_admin => true,
|
|
|
|
:role_finance => true,
|
|
|
|
:role_article_meta => true,
|
2017-11-15 23:58:11 +01:00
|
|
|
:role_pickups => true,
|
2014-04-08 13:11:06 +02:00
|
|
|
:role_suppliers => true,
|
|
|
|
:role_orders => true
|
|
|
|
)
|
|
|
|
|
|
|
|
# Create admin user
|
|
|
|
User.create(
|
|
|
|
:nick => "admin",
|
|
|
|
:first_name => "Anton",
|
|
|
|
:last_name => "Administrator",
|
|
|
|
:email => "admin@foo.test",
|
|
|
|
:password => "secret",
|
|
|
|
:groups => [administrators]
|
|
|
|
)
|
|
|
|
|
2017-03-04 14:15:18 +01:00
|
|
|
# First entry for financial transaction types
|
|
|
|
financial_transaction_class = FinancialTransactionClass.create(:name => "Other")
|
|
|
|
FinancialTransactionType.create(:name => "Foodcoop", :financial_transaction_class_id => financial_transaction_class.id)
|
|
|
|
|
2014-04-08 13:11:06 +02:00
|
|
|
# First entry for article categories
|
|
|
|
ArticleCategory.create(:name => "Other", :description => "other, misc, unknown")
|