Index: openacs-4/packages/acs-subsite/acs-subsite.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/acs-subsite.info,v diff -u -r1.24 -r1.25 --- openacs-4/packages/acs-subsite/acs-subsite.info 9 Feb 2002 02:33:35 -0000 1.24 +++ openacs-4/packages/acs-subsite/acs-subsite.info 13 Mar 2002 23:00:39 -0000 1.25 @@ -494,8 +494,6 @@ - - @@ -580,7 +578,6 @@ - @@ -596,6 +593,7 @@ + Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/acs-subsite/www/permissions/toggle-inherit-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/acs-subsite/www/permissions/toggle-inherit-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/acs-subsite/www/permissions/toggle-inherit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/permissions/toggle-inherit.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-subsite/www/permissions/toggle-inherit.tcl 13 Mar 2001 22:59:26 -0000 1.1 +++ openacs-4/packages/acs-subsite/www/permissions/toggle-inherit.tcl 13 Mar 2002 22:54:34 -0000 1.2 @@ -13,10 +13,6 @@ ad_require_permission $object_id admin -db_dml toggle_inherit { - update acs_objects - set security_inherit_p = decode(security_inherit_p, 't', 'f', 'f', 't') - where object_id = :object_id -} +permission::toggle_inherit -object_id $object_id ad_returnredirect one?[export_url_vars object_id] Index: openacs-4/packages/acs-tcl/tcl/acs-permissions-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/acs-permissions-procs-oracle.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-tcl/tcl/acs-permissions-procs-oracle.xql 11 Dec 2001 03:47:29 -0000 1.4 +++ openacs-4/packages/acs-tcl/tcl/acs-permissions-procs-oracle.xql 13 Mar 2002 22:54:44 -0000 1.5 @@ -32,13 +32,22 @@ - select acs_object.name(:object_id) from dual - + + + update acs_objects + set security_inherit_p = case when security_inherit_p = 't' + then 'f' + else 't' + end + where object_id = :object_id + + + Index: openacs-4/packages/acs-tcl/tcl/acs-permissions-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/acs-permissions-procs-postgresql.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-tcl/tcl/acs-permissions-procs-postgresql.xql 21 Nov 2001 21:18:33 -0000 1.3 +++ openacs-4/packages/acs-tcl/tcl/acs-permissions-procs-postgresql.xql 13 Mar 2002 22:54:44 -0000 1.4 @@ -35,5 +35,12 @@ - + + + update acs_objects + set security_inherit_p = not security_inherit_p + where object_id = :object_id + + + Index: openacs-4/packages/acs-tcl/tcl/acs-permissions-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/acs-permissions-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-tcl/tcl/acs-permissions-procs.tcl 21 Nov 2001 21:18:33 -0000 1.3 +++ openacs-4/packages/acs-tcl/tcl/acs-permissions-procs.tcl 13 Mar 2002 22:54:44 -0000 1.4 @@ -90,3 +90,31 @@ ad_require_permission [ad_conn object_id] read return filter_ok } + +namespace eval permission { + + ad_proc -public toggle_inherit { + {-object_id:required} + } { + toggle whether or not this object inherits permissions from it's parent + } { + db_dml toggle_inherit {} + } + + ad_proc -public set_inherit { + {-object_id:required} + } { + set inherit to true + } { + db_dml set_inherit {} + } + + ad_proc -public set_not_inherit { + {-object_id:required} + } { + set inherit to false + } { + db_dml set_not_inherit {} + } + +} Index: openacs-4/packages/acs-tcl/tcl/acs-permissions-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/acs-permissions-procs.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-tcl/tcl/acs-permissions-procs.xql 24 Apr 2001 06:02:26 -0000 1.1 +++ openacs-4/packages/acs-tcl/tcl/acs-permissions-procs.xql 13 Mar 2002 22:54:44 -0000 1.2 @@ -11,5 +11,20 @@ + + + update acs_objects + set security_inherit_p = 't' + where object_id = :object_id + + + + + update acs_objects + set security_inherit_p = 'f' + where object_id = :object_id + + +