Index: openacs-4/contrib/packages/simulation/sql/postgresql/simulation-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/sql/postgresql/Attic/simulation-drop.sql,v diff -u -r1.11 -r1.12 --- openacs-4/contrib/packages/simulation/sql/postgresql/simulation-drop.sql 1 Dec 2003 13:07:12 -0000 1.11 +++ openacs-4/contrib/packages/simulation/sql/postgresql/simulation-drop.sql 1 Dec 2003 14:10:44 -0000 1.12 @@ -191,12 +191,14 @@ create function inline_0 () returns integer as ' begin - perform acs_privilege__drop_privilege(''sim_template_create''); - perform acs_privilege__drop_privilege(''sim_inst''); - perform acs_privilege__drop_privilege(''sim_object_create''); - perform acs_privilege__drop_privilege(''sim_object_write''); - perform acs_privilege__drop_privilege(''sim_set_map_p''); + perform acs_privilege__remove_child(''sim_admin'',''sim_template_create''); + perform acs_privilege__remove_child(''sim_admin'',''sim_inst''); + perform acs_privilege__remove_child(''sim_admin'',''sim_object_create''); + perform acs_privilege__remove_child(''sim_admin'',''sim_object_write''); + perform acs_privilege__remove_child(''sim_admin'',''sim_set_map_p''); + perform acs_privilege__drop_privilege(''sim_admin''); + return null; end;' language 'plpgsql'; Index: openacs-4/contrib/packages/simulation/sql/postgresql/simulation-privs-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/sql/postgresql/Attic/simulation-privs-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/simulation/sql/postgresql/simulation-privs-create.sql 1 Dec 2003 13:07:12 -0000 1.1 +++ openacs-4/contrib/packages/simulation/sql/postgresql/simulation-privs-create.sql 1 Dec 2003 14:10:44 -0000 1.2 @@ -1,7 +1,9 @@ -- privileges +select acs_privilege__create_privilege('sim_admin','Simulation Admin',null); -select acs_privilege__create_privilege('sim_template_create','Can create and edit sim templates',null); -select acs_privilege__create_privilege('sim_inst','Can instantiate a sim template into a simulation and edit the simulation',null); -select acs_privilege__create_privilege('sim_object_create','Can create global sim objects',null); -select acs_privilege__create_privilege('sim_object_write','Can change other people''s sim objects',null); -select acs_privilege__create_privilege('sim_set_map_p','Can set and un-set on_map_p for any sim object',null); +-- add children +select acs_privilege__add_child('sim_admin','sim_template_create'); +select acs_privilege__add_child('sim_admin','sim_inst'); +select acs_privilege__add_child('sim_admin','sim_object_create'); +select acs_privilege__add_child('sim_admin','sim_object_write'); +select acs_privilege__add_child('sim_admin','sim_set_map_p'); Index: openacs-4/packages/simulation/sql/postgresql/simulation-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/sql/postgresql/simulation-drop.sql,v diff -u -r1.11 -r1.12 --- openacs-4/packages/simulation/sql/postgresql/simulation-drop.sql 1 Dec 2003 13:07:12 -0000 1.11 +++ openacs-4/packages/simulation/sql/postgresql/simulation-drop.sql 1 Dec 2003 14:10:44 -0000 1.12 @@ -191,12 +191,14 @@ create function inline_0 () returns integer as ' begin - perform acs_privilege__drop_privilege(''sim_template_create''); - perform acs_privilege__drop_privilege(''sim_inst''); - perform acs_privilege__drop_privilege(''sim_object_create''); - perform acs_privilege__drop_privilege(''sim_object_write''); - perform acs_privilege__drop_privilege(''sim_set_map_p''); + perform acs_privilege__remove_child(''sim_admin'',''sim_template_create''); + perform acs_privilege__remove_child(''sim_admin'',''sim_inst''); + perform acs_privilege__remove_child(''sim_admin'',''sim_object_create''); + perform acs_privilege__remove_child(''sim_admin'',''sim_object_write''); + perform acs_privilege__remove_child(''sim_admin'',''sim_set_map_p''); + perform acs_privilege__drop_privilege(''sim_admin''); + return null; end;' language 'plpgsql'; Index: openacs-4/packages/simulation/sql/postgresql/simulation-privs-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/sql/postgresql/simulation-privs-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/simulation/sql/postgresql/simulation-privs-create.sql 1 Dec 2003 13:07:12 -0000 1.1 +++ openacs-4/packages/simulation/sql/postgresql/simulation-privs-create.sql 1 Dec 2003 14:10:44 -0000 1.2 @@ -1,7 +1,9 @@ -- privileges +select acs_privilege__create_privilege('sim_admin','Simulation Admin',null); -select acs_privilege__create_privilege('sim_template_create','Can create and edit sim templates',null); -select acs_privilege__create_privilege('sim_inst','Can instantiate a sim template into a simulation and edit the simulation',null); -select acs_privilege__create_privilege('sim_object_create','Can create global sim objects',null); -select acs_privilege__create_privilege('sim_object_write','Can change other people''s sim objects',null); -select acs_privilege__create_privilege('sim_set_map_p','Can set and un-set on_map_p for any sim object',null); +-- add children +select acs_privilege__add_child('sim_admin','sim_template_create'); +select acs_privilege__add_child('sim_admin','sim_inst'); +select acs_privilege__add_child('sim_admin','sim_object_create'); +select acs_privilege__add_child('sim_admin','sim_object_write'); +select acs_privilege__add_child('sim_admin','sim_set_map_p');