Commit c761df2c4b21e61c742d37f32581727cdbc53d10
1 parent
b8cb371d
Exists in
master
and in
29 other branches
ActionItem154: adding two communities to the sample data
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1375 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
9 additions
and
5 deletions
Show diff stats
script/anhetegua
... | ... | @@ -32,10 +32,6 @@ def new_validator(region, name, identifier, klass = Organization) |
32 | 32 | org |
33 | 33 | end |
34 | 34 | |
35 | -def new_member(org, person) | |
36 | - org.affiliate() | |
37 | -end | |
38 | - | |
39 | 35 | environment_description = <<-EOF |
40 | 36 | <h1> |
41 | 37 | Boas vindas ao Anheteguá: |
... | ... | @@ -86,7 +82,7 @@ asl = new_validator(rs, 'Associacao Software Livre.Org', 'asl') |
86 | 82 | forum_rs = new_validator(rs, 'Forum Gaucho de Economia Solidaria', 'ecosolrs') |
87 | 83 | |
88 | 84 | # Role for own things |
89 | -owner_role = Role.create!(:name => 'dono', :permissions => ['edit_profile', 'destroy_profile', 'manage_memberships', 'post_content', 'edit_profile_design', 'manage_products']) | |
85 | +owner_role = Profile::Roles.admin | |
90 | 86 | |
91 | 87 | # root user of the system, admin_role for him, the assignment of the role for him and the ownership of the system homepage |
92 | 88 | root = User.create!(:login => 'root', :email => 'root@noosfero.org', :password => 'root', :password_confirmation => 'root').person |
... | ... | @@ -158,3 +154,11 @@ empa_hp = TinyMceArticle.new(:name => 'Empreendimento A - um empreendimento genà |
158 | 154 | empa_hp.profile = empa |
159 | 155 | empa.home_page = empa_hp |
160 | 156 | empa.save! |
157 | + | |
158 | +# creating sample communities | |
159 | +comm1 = Community.create!(:name => 'Outra Economia é PossÃvel') | |
160 | +comm1.affiliate(ze, owner_role) | |
161 | + | |
162 | +comm2 = Community.create!(:name => 'Software Livre e Economia Solidária') | |
163 | +comm2.affiliate(ze, owner_role) | |
164 | + | ... | ... |