Index: openacs-4/packages/dotlrn-fs/tcl/dotlrn-fs-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-fs/tcl/dotlrn-fs-procs.tcl,v diff -u -r1.77.2.1 -r1.77.2.2 --- openacs-4/packages/dotlrn-fs/tcl/dotlrn-fs-procs.tcl 18 Feb 2003 01:49:23 -0000 1.77.2.1 +++ openacs-4/packages/dotlrn-fs/tcl/dotlrn-fs-procs.tcl 8 Mar 2003 01:52:58 -0000 1.77.2.2 @@ -155,7 +155,8 @@ site_node_object_map::new -object_id $a_folder_id -node_id $node_id if {[string equal $root_community_type dotlrn_class_instance]} { - # a class instance, has some "folder contents" pe's that need filling + + # a class instance has some "folder contents" pe's that need filling set portlet_list [parameter::get_from_package_key \ -package_key [my_package_key] \ -parameter "dotlrn_class_instance_folders_to_show" @@ -170,6 +171,16 @@ ] portal::set_element_param $element_id folder_id $a_folder_id } + + # We also don't want anyone other than the site-wide admin to be + # able to edit or delete these folders, because doing so breaks + # the standard portlets created to display them. Admins can write + # to them, that's all. + + permission::set_not_inherit -object_id $a_folder_id + permission::grant -party_id $members -object_id $a_folder_id -privilege read + permission::grant -party_id $admins -object_id $a_folder_id -privilege write + } } @@ -182,7 +193,13 @@ site_node_object_map::new -object_id $public_folder_id -node_id $node_id - # The public folder is available to all dotLRN Full Access Users + # The public folder is available to all dotLRN Full Access Users. Admins can + # write to it but can't delete it by default, because the non-member portlet + # expects it to exist. + + permission::set_not_inherit -object_id $public_folder_id + permission::grant -party_id $admins -object_id $public_folder_id -privilege write + set dotlrn_public [dotlrn::get_users_rel_segment_id] permission::grant -party_id $dotlrn_public -object_id $public_folder_id -privilege read