Index: openacs-4/packages/acs-subsite/tcl/application-group-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/application-group-procs.tcl,v diff -u -r1.2.2.2 -r1.2.2.3 --- openacs-4/packages/acs-subsite/tcl/application-group-procs.tcl 17 Mar 2003 02:26:21 -0000 1.2.2.2 +++ openacs-4/packages/acs-subsite/tcl/application-group-procs.tcl 14 Jul 2003 13:30:24 -0000 1.2.2.3 @@ -235,6 +235,14 @@ Delete the given application group and all relational segments and constraints dependent on it (handled by the PL/[pg]SQL API } { + # LARS HACK: + # Delete permissions on: + # - the application group + # - any relational segment of this group + # - any relation with this gorup + # We really ought to have cascading deletes on acs_permissions.grantee_id (and object_id) + db_dml delete_perms {} + db_exec_plsql delete {} } Index: openacs-4/packages/acs-subsite/tcl/application-group-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/Attic/application-group-procs.xql,v diff -u -r1.3.2.1 -r1.3.2.2 --- openacs-4/packages/acs-subsite/tcl/application-group-procs.xql 17 Mar 2003 02:26:21 -0000 1.3.2.1 +++ openacs-4/packages/acs-subsite/tcl/application-group-procs.xql 14 Jul 2003 13:30:24 -0000 1.3.2.2 @@ -10,5 +10,16 @@ + + + + + delete from acs_permissions + where grantee_id = :group_id + or grantee_id in (select segment_id from rel_segments where group_id = :group_id) + or grantee_id in (select rel_id from acs_rels where object_id_one = :group_id or object_id_two = :group_id) + + +