From 045d87b648c11d4a7b2a47c3644316be1f990ee5 Mon Sep 17 00:00:00 2001 From: LeandroNunes Date: Mon, 19 Nov 2007 19:30:35 +0000 Subject: [PATCH] ActionItem19: updating script anhetegua --- script/anhetegua | 6 ++++++ 1 file changed, 6 insertions(+), 0 deletions(-) diff --git a/script/anhetegua b/script/anhetegua index 7c48a22..0848ff9 100755 --- a/script/anhetegua +++ b/script/anhetegua @@ -48,20 +48,26 @@ new_validator(df, 'Forum Brasileiro de Economia Solidaria', 'fbes') new_validator(rs, 'Associacao Software Livre.Org', 'asl') new_validator(rs, 'Forum Gaucho de Economia Solidaria', 'ecosolrs') +Profile.destroy_all # Profile for exibition of homepage and creations of sytem articles such as about and accessibility noosfero = Profile.create!(:name => 'noosfero', :identifier => 'noosfero') +Role.destroy_all # Role for own things owner_role = Role.create!(:name => 'owner', :permissions => ['edit_profile', 'destroy_profile', 'manage_memberships', 'post_content', 'edit_profile_design']) # root user of the system, admin_role for him, the assignment of the role for him and the ownership of the system homepage +User.destroy_all root = User.create!(:login => 'root', :email => 'root@noosfero.org', :password => 'root', :password_confirmation => 'root').person admin_role = Role.create!(:name => 'admin', :permissions => ['view_environment_admin_panel','edit_environment_features', 'edit_environment_design', 'manage_environment_categories', 'manage_environment_roles', 'manage_environment_validators']) + +RoleAssignment.destroy_all RoleAssignment.create!(:accessor => root, :role => admin_role, :resource => Environment.default) RoleAssignment.create!(:accessor => root, :role => owner_role, :resource => noosfero) # Sample user and sample enterprise owned by him ze= User.create!(:login => 'ze', :email => 'ze@localhost.localdomain', :password => 'test', :password_confirmation => 'test').person +Enterprise.destroy_all empa = Enterprise.create!(:name => 'Empreendimento A', :identifier => 'empreendimento_a') RoleAssignment.create!(:accessor => ze, :role => owner_role, :resource => empa) -- libgit2 0.21.2