Index: openacs-4/packages/acs-subsite/www/permissions/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/permissions/index-oracle.xql,v diff -u -r1.2.4.1 -r1.2.4.2 --- openacs-4/packages/acs-subsite/www/permissions/index-oracle.xql 7 Dec 2002 16:06:29 -0000 1.2.4.1 +++ openacs-4/packages/acs-subsite/www/permissions/index-oracle.xql 9 Dec 2002 15:04:50 -0000 1.2.4.2 @@ -5,12 +5,15 @@ - select distinct o.object_id, acs_object.name(o.object_id) as name, context_id, object_type, + select o.object_id, acs_object.name(o.object_id) as name, context_id, object_type, (case when o.object_id = :root then 0 else 1 end) as child - from acs_objects o, all_object_party_privilege_map map - where map.object_id = o.object_id - and map.party_id = :user_id - and map.privilege = 'admin' + from acs_objects o + where exists ( + SELECT 1 + FROM all_object_party_privilege_map map + WHERE map.object_id = o.object_id + and map.party_id = :user_id + and map.privilege = 'admin') and (o.object_id = :root or o.context_id = :root) order by child, object_type, name Index: openacs-4/packages/acs-subsite/www/permissions/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/permissions/index-postgresql.xql,v diff -u -r1.4.4.1 -r1.4.4.2 --- openacs-4/packages/acs-subsite/www/permissions/index-postgresql.xql 7 Dec 2002 16:06:29 -0000 1.4.4.1 +++ openacs-4/packages/acs-subsite/www/permissions/index-postgresql.xql 9 Dec 2002 15:04:50 -0000 1.4.4.2 @@ -5,12 +5,14 @@ - select distinct o.object_id, acs_object__name(o.object_id) as name, context_id, object_type, + select o.object_id, acs_object__name(o.object_id) as name, context_id, object_type, (case when o.object_id = :root then 0 else 1 end) as child - from acs_objects o, acs_permissions_all map - where map.object_id = o.object_id - and map.grantee_id = :user_id - and map.privilege = 'admin' + from acs_objects o + where exists ( SELECT 1 + FROM acs_permissions_all map + WHERE map.object_id = o.object_id + and map.grantee_id = :user_id + and map.privilege = 'admin') and (o.object_id = :root or o.context_id = :root) order by child, object_type, name Index: openacs-4/packages/acs-subsite/www/permissions/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/permissions/index.tcl,v diff -u -r1.1.1.1.4.1 -r1.1.1.1.4.2 --- openacs-4/packages/acs-subsite/www/permissions/index.tcl 7 Dec 2002 16:06:29 -0000 1.1.1.1.4.1 +++ openacs-4/packages/acs-subsite/www/permissions/index.tcl 9 Dec 2002 15:04:50 -0000 1.1.1.1.4.2 @@ -14,14 +14,14 @@ set user_id [ad_maybe_redirect_for_registration] +set context "Permissions" + if {![exists_and_not_null root]} { set root [ad_conn package_id] } db_multirow objects adminable_objects { *SQL* } -set context "Permissions" - set security_context_root [acs_magic_object security_context_root] set default_context [acs_magic_object default_context] set admin_p [permission::permission_p -object_id $security_context_root -party_id $user_id -privilege admin]