Index: openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl,v diff -u -r1.16 -r1.17 --- openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl 29 Dec 2008 02:18:41 -0000 1.16 +++ openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl 8 Jan 2009 16:03:17 -0000 1.17 @@ -23,9 +23,10 @@ my instvar package_key if {[info exists privilege]} { set sql [::xo::db::sql select -vars package_id \ - -from "apm_packages, acs_object_party_privilege_map ppm" \ + -from "apm_packages, acs_object_party_privilege_map ppm, site_nodes s" \ -where { package_key = :package_key + and s.object_id = package_id and ppm.object_id = package_id and ppm.party_id = :party_id and ppm.privilege = :privilege