Index: openacs-4/packages/acs-subsite/www/admin/groups/elements-by-group-type.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/groups/elements-by-group-type.tcl,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/acs-subsite/www/admin/groups/elements-by-group-type.tcl 28 Nov 2018 11:43:28 -0000 1.5 +++ openacs-4/packages/acs-subsite/www/admin/groups/elements-by-group-type.tcl 28 Nov 2018 11:50:52 -0000 1.6 @@ -31,9 +31,6 @@ group_id:integer } -set user_id [ad_conn user_id] -set package_id [ad_conn package_id] - # ISSUE: this doesn't check permissions when generating the number_groups. # So a user might be told that there are 156 groups of type X, then when they # click to zoom in, they see only 10 groups listed (because they only have @@ -49,7 +46,7 @@ application_group_element_map app_group where o.object_id = g.group_id and o.object_type = t.object_type - and app_group.package_id = :package_id + and app_group.package_id = (select package_id from application_groups where group_id = :group_id) and app_group.element_id = g.group_id group by t.object_type, t.pretty_name order by lower(t.pretty_name)