Index: openacs-4/packages/postcard/sql/postgresql/postcard-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/postcard/sql/postgresql/postcard-create.sql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/postcard/sql/postgresql/postcard-create.sql	23 Feb 2003 18:22:05 -0000	1.4
+++ openacs-4/packages/postcard/sql/postgresql/postcard-create.sql	13 Jan 2005 13:58:37 -0000	1.5
@@ -1,94 +1,5 @@
 -- electronic postcard
 
-
-/* first we create the permissions model for postcards
-
-  defining these basic actions
-   
-  - upload images
-  - view postcard
-  - moderate images
-  - create card to send
-
-  and then define the base security privileges that we
-  want to have. applications that want to designate
-  to the end user fine grained permission control, should 
-  designate appropiate basic privileges as the atomic level
-  of an applications/services security.
-
-*/ 
-begin;
-
- select acs_privilege__create_privilege('postcard_create_image',null,null);
- select acs_privilege__create_privilege('postcard_create_card',null,null);
- select acs_privilege__create_privilege('postcard_read',null,null);
- select acs_privilege__create_privilege('postcard_admin',null,null);
-
-
- -- bind privileges to privilege heirarchy
-
- select acs_privilege__add_child('create', 'postcard_create_image');
- select acs_privilege__add_child('create', 'postcard_create_card');
- select acs_privilege__add_child('read', 'postcard_read');
-
- select acs_privilege__add_child('admin','postcard_admin');
-end;
-
-
-/* 
-   Creating permissions basically involves binding the
-   privilege to the object system.
-
-   permissions involve binding a particular privilege
-   to a user in a given context.
-
-   We grant the permissions to the public
-
-   inline function - inline funcs are used to allow 
-   calling pl/pgsql.
-*/
- 
-create function inline_0 ()
-returns integer as '
-declare
-    default_context integer;
-    registered_users integer;
-    the_public integer;
-begin
-
-    default_context := acs__magic_object_id(''default_context'');
-    registered_users := acs__magic_object_id(''registered_users'');
-    the_public := acs__magic_object_id(''the_public'');
-
-    -- give registered users the power to post by default
-
-    perform acs_permission__grant_permission (
-        default_context,
-        registered_users,
-        ''postcard_create_card''
-    );
-
-    perform acs_permission__grant_permission (
-        default_context,
-        registered_users,
-        ''postcard_create_image''
-    );
-
-    -- give the public the power to read by default
-
-    perform acs_permission__grant_permission (
-        default_context,
-        the_public,
-        ''postcard_read''
-    );
-
-    return 0;
-end;
-' language 'plpgsql';
-
-select inline_0 ();
-drop function inline_0 ();
-
 /* basic data model
 
 this needs to get migrated to the content-repository
