Index: openacs-4/packages/wp-slim/www/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/index-postgresql.xql,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/wp-slim/www/index-postgresql.xql 13 Mar 2002 22:50:53 -0000 1.2 +++ openacs-4/packages/wp-slim/www/index-postgresql.xql 21 May 2003 15:31:03 -0000 1.2.2.1 @@ -17,6 +17,7 @@ and ao.creation_user = p.person_id and pres.public_p = 't' and ao.context_id = :package_id + $extra_where_clauses @@ -33,6 +34,7 @@ and ao.object_id = i.item_id and ao.creation_user = :user_id and ao.context_id = :package_id + $extra_where_clauses @@ -41,22 +43,25 @@ - select i.item_id as pres_item_id, - pres.pres_title, - to_char(ao.creation_date, 'Month DD, YYYY') as creation_date, - ao.creation_user, - p.first_names || ' ' || p.last_name as full_name, + select i.item_id as pres_item_id, + pres.pres_title, + to_char(ao.creation_date, 'Month DD, YYYY') as creation_date, + ao.creation_user, + p.first_names || ' ' || p.last_name as full_name, acs_permission__permission_p(i.item_id, :user_id, 'wp_edit_presentation') as edit_p - from cr_items i, cr_wp_presentations pres, persons p, acs_objects ao - where i.live_revision = pres.presentation_id - and ao.object_id = i.item_id - and ao.creation_user <> :user_id - and ao.creation_user = p.person_id - and acs_permission__permission_p(i.item_id, :user_id, 'wp_view_presentation') = 't' - and ao.context_id = :package_id - + from cr_items i, cr_wp_presentations pres, persons p, acs_objects ao + where i.live_revision = pres.presentation_id + and ao.object_id = i.item_id + and ao.creation_user <> :user_id + and ao.creation_user = p.person_id + and ao.context_id = :package_id + $extra_where_clauses + and exists (select 1 + from acs_object_party_privilege_map m + where m.object_id = i.item_id + and m.party_id = :user_id + and m.privilege = 'wp_view_presentation') -