Index: openacs-4/packages/notes/www/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notes/www/index-oracle.xql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/notes/www/index-oracle.xql 30 Nov 2002 17:39:52 -0000 1.2 +++ openacs-4/packages/notes/www/index-oracle.xql 10 Feb 2004 19:39:49 -0000 1.3 @@ -1,34 +1,35 @@ -oracle8.1.6 + oracle8.1.6 - - - - select note_id, owner_id, title, body, - decode(acs_permission.permission_p(note_id, - :user_id, - 'write'), - 't', 1, - 'f', 0) as write_p, - decode(acs_permission.permission_p(note_id, - :user_id, - 'admin'), - 't', 1, - 'f', 0) as admin_p, - decode(acs_permission.permission_p(note_id, - :user_id, - 'delete'), - 't', 1, - 'f', 0) as delete_p - from notes n, acs_objects o - where n.note_id = o.object_id - and o.context_id = :package_id - and acs_permission.permission_p(note_id, :user_id, 'read') = 't' - order by creation_date - - - - + + + select note_id, title, body, + decode(acs_permission.permission_p(note_id, + :user_id, + 'write'), + 't', 1, + 'f', 0) as write_p, + decode(acs_permission.permission_p(note_id, + :user_id, + 'admin'), + 't', 1, + 'f', 0) as admin_p, + decode(acs_permission.permission_p(note_id, + :user_id, + 'delete'), + 't', 1, + 'f', 0) as delete_p + from notes n, acs_objects o + where n.note_id = o.object_id + and o.context_id = :package_id + and exists (select 1 + from acs_object_party_privilege_map + where object_id = note_id + and party_id = :user_id + and privilege = 'read') + order by creation_date + +