Index: openacs-4/packages/acs-subsite/www/admin/site-map/site-map-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/site-map/site-map-oracle.xql,v
diff -u -r1.3.20.1 -r1.3.20.2
--- openacs-4/packages/acs-subsite/www/admin/site-map/site-map-oracle.xql 3 Sep 2019 11:10:10 -0000 1.3.20.1
+++ openacs-4/packages/acs-subsite/www/admin/site-map/site-map-oracle.xql 17 Nov 2022 03:28:39 -0000 1.3.20.2
@@ -50,4 +50,21 @@
+
+
+ WITH site_node_path(node_id,parent_id,name,object_id,directory_p,mylevel) AS (
+ select node_id, parent_id, name, object_id, directory_p, 1 as mylevel
+ from site_nodes where node_id = :root_id
+ UNION ALL
+ select c.node_id, c.parent_id, c.name, c.object_id, c.directory_p, p.mylevel+1 mylevel
+ from site_node_path p, site_nodes c where c.node_id = p.parent_id
+ )
+ select
+ node_id, name, directory_p, mylevel,
+ acs_object.name(object_id) as obj_name,
+ acs_permission.permission_p(object_id, :user_id, 'admin') as admin_p
+ from site_node_path order by mylevel desc
+
+
+
Index: openacs-4/packages/acs-subsite/www/admin/site-map/site-map-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/site-map/site-map-postgresql.xql,v
diff -u -r1.5.2.1 -r1.5.2.2
--- openacs-4/packages/acs-subsite/www/admin/site-map/site-map-postgresql.xql 3 Sep 2019 11:10:10 -0000 1.5.2.1
+++ openacs-4/packages/acs-subsite/www/admin/site-map/site-map-postgresql.xql 17 Nov 2022 03:28:39 -0000 1.5.2.2
@@ -41,4 +41,22 @@
+
+ postgresql8.4
+
+ WITH RECURSIVE site_node_path AS (
+ select node_id, parent_id, name, object_id, directory_p, 1 as level
+ from site_nodes where node_id = :root_id
+ UNION ALL
+ select c.node_id, c.parent_id, c.name, c.object_id, c.directory_p, p.level+1
+ from site_node_path p, site_nodes as c where c.node_id = p.parent_id
+ )
+ select
+ node_id, name, directory_p, level,
+ acs_object.name(object_id) as obj_name,
+ acs_permission.permission_p(object_id, :user_id, 'admin') as admin_p
+ from site_node_path order by level desc
+
+
+
Index: openacs-4/packages/acs-subsite/www/admin/site-map/site-map.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/site-map/site-map.tcl,v
diff -u -r1.17.2.2 -r1.17.2.3
--- openacs-4/packages/acs-subsite/www/admin/site-map/site-map.tcl 3 Sep 2019 11:10:10 -0000 1.17.2.2
+++ openacs-4/packages/acs-subsite/www/admin/site-map/site-map.tcl 17 Nov 2022 03:28:39 -0000 1.17.2.3
@@ -55,20 +55,7 @@
# table.
#
set head ""
-db_foreach path_select {
- WITH RECURSIVE site_node_path AS (
- select node_id, parent_id, name, object_id, directory_p, 1 as level
- from site_nodes where node_id = :root_id
- UNION ALL
- select c.node_id, c.parent_id, c.name, c.object_id, c.directory_p, p.level+1
- from site_node_path p, site_nodes as c where c.node_id = p.parent_id
- )
- select
- node_id, name, directory_p, level,
- acs_object.name(object_id) as obj_name,
- acs_permission.permission_p(object_id, :user_id, 'admin') as admin_p
- from site_node_path order by level desc
-} {
+db_foreach path_select {} {
if {$node_id != $root_id && $admin_p == "t"} {
set href [export_vars -base . {expand:multiple {root_id $node_id}}]
append head [subst {}]
@@ -330,7 +317,7 @@
where ap.package_key = apm_package_types.package_key
and package_type = 'apm_service'
and not exists (select 1 from site_nodes sn where sn.object_id = package_id)
- and acs_permission.permission_p(package_id, :user_id,'admin')
+ and acs_permission.permission_p(package_id, :user_id,'admin') = 't'
order by instance_name
} {
if {$parameter_count > 0} {