Fisheye: Tag 1.1.1.1.22.1 refers to a dead (removed) revision in file `openacs-4/packages/categories/www/index-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2.22.1 refers to a dead (removed) revision in file `openacs-4/packages/categories/www/index-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/categories/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/www/index.tcl,v diff -u -r1.11 -r1.11.2.1 --- openacs-4/packages/categories/www/index.tcl 29 Jun 2018 17:27:18 -0000 1.11 +++ openacs-4/packages/categories/www/index.tcl 15 Mar 2019 11:05:01 -0000 1.11.2.1 @@ -23,7 +23,11 @@ template::multirow create trees tree_ids tree_name site_wide_p short_name -db_foreach get_trees "" { +db_foreach get_trees { + select tree_id, site_wide_p, + acs_permission.permission_p(tree_id, :user_id, 'category_tree_read') as has_read_p + from category_trees +} { if { $has_read_p == "t" || $site_wide_p == "t" } { set tree_name [category_tree::get_name $tree_id $locale] template::multirow append trees $tree_id $tree_name $site_wide_p Index: openacs-4/packages/categories/www/categories-browse-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/www/Attic/categories-browse-oracle.xql,v diff -u -r1.3 -r1.3.2.1 --- openacs-4/packages/categories/www/categories-browse-oracle.xql 7 Aug 2017 23:48:05 -0000 1.3 +++ openacs-4/packages/categories/www/categories-browse-oracle.xql 15 Mar 2019 11:10:11 -0000 1.3.2.1 @@ -27,33 +27,4 @@ - - - select t.tree_id - from category_trees t, category_temp tmp - where (t.site_wide_p = 't' - or exists (select 1 - from acs_object_party_privilege_map oppm - where oppm.object_id = t.tree_id - and oppm.party_id = :user_id - and oppm.privilege = 'category_tree_read')) - and t.tree_id = tmp.category_id - - - - - - select n.object_id - from acs_named_objects n, ($subtree_sql) s - where n.object_id = s.object_id - and exists (select 1 - from acs_object_party_privilege_map oppm - where oppm.object_id = n.object_id - and oppm.party_id = :user_id - and oppm.privilege = 'read') - $letter_sql - $package_sql - - - Index: openacs-4/packages/categories/www/categories-browse-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/www/Attic/categories-browse-postgresql.xql,v diff -u -r1.4 -r1.4.2.1 --- openacs-4/packages/categories/www/categories-browse-postgresql.xql 7 Aug 2017 23:48:05 -0000 1.4 +++ openacs-4/packages/categories/www/categories-browse-postgresql.xql 15 Mar 2019 11:10:11 -0000 1.4.2.1 @@ -21,28 +21,4 @@ - - - select t.tree_id - from category_trees t, category_temp tmp - where ( - t.site_wide_p = 't' - or acs_permission__permission_p(t.tree_id, :user_id, 'category_tree_read') - ) - and t.tree_id = tmp.category_id - - - - - - select n.object_id - from acs_named_objects n, ($subtree_sql) s - where n.object_id = s.object_id - and acs_permission__permission_p(n.object_id, :user_id, 'read') - $letter_sql - $package_sql - - - - Index: openacs-4/packages/categories/www/categories-browse.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/www/categories-browse.tcl,v diff -u -r1.14 -r1.14.2.1 --- openacs-4/packages/categories/www/categories-browse.tcl 29 Jun 2018 17:27:18 -0000 1.14 +++ openacs-4/packages/categories/www/categories-browse.tcl 15 Mar 2019 11:10:11 -0000 1.14.2.1 @@ -44,7 +44,15 @@ foreach tree_id $tree_ids { db_dml insert_tmp_category_trees "" } - set tree_ids [db_list check_permissions_on_trees ""] + set tree_ids [db_list check_permissions_on_trees { + select t.tree_id + from category_trees t, category_temp tmp + where ( + t.site_wide_p = 't' + or acs_permission.permission_p(t.tree_id, :user_id, 'category_tree_read') + ) + and t.tree_id = tmp.category_id + }] } db_dml delete_tmp_category_trees "" @@ -164,7 +172,14 @@ # cannot be passed by name to the paginator, or such variables # won't be resolved correctly insite the machinery. Just compute # the sql text here and pass it as is. - set sql [db_map get_categorized_object_count] + set sql [subst { + select n.object_id + from acs_named_objects n, ($subtree_sql) s + where n.object_id = s.object_id + and acs_permission.permission_p(n.object_id, :user_id, 'read') + $letter_sql + $package_sql + }] paginator create -- $p_name $sql -pagesize 20 -groupsize 10 -contextual -timeout 0 set first_row [paginator get_row $p_name $page] Fisheye: Tag 1.1.1.1.22.1 refers to a dead (removed) revision in file `openacs-4/packages/categories/www/cadmin/index-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2.22.1 refers to a dead (removed) revision in file `openacs-4/packages/categories/www/cadmin/index-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/categories/www/cadmin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/www/cadmin/index.tcl,v diff -u -r1.14 -r1.14.2.1 --- openacs-4/packages/categories/www/cadmin/index.tcl 29 Jun 2018 17:27:18 -0000 1.14 +++ openacs-4/packages/categories/www/cadmin/index.tcl 15 Mar 2019 11:12:27 -0000 1.14.2.1 @@ -27,7 +27,12 @@ template::multirow create trees_with_read_permission tree_id tree_name site_wide_p description -db_foreach trees {} { +db_foreach trees { + select tree_id, site_wide_p, + acs_permission.permission_p(tree_id, :user_id, 'category_tree_write') as has_write_p, + acs_permission.permission_p(tree_id, :user_id, 'category_tree_read') as has_read_p + from category_trees +} { array unset tree_array array set tree_array [category_tree::get_data $tree_id $locale]