Index: openacs-4/contrib/obsolete-packages/bboard/www/simple-message.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/simple-message.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/simple-message.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/simple-message.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -16,16 +16,24 @@ set mail_friend_p [ad_parameter "MailFriendEnabledP"] set attachments_p [ad_parameter "AttachmentsEnabledP"] +if {[ad_parameter "UserPostsDeletableP"] == "t"} { + if [info exists write_p] { + set delete_p $write_p + } +} else { + if [info exists admin_p] { + set delete_p $admin_p + } +} + set formatted_content [acs_messaging_format_as_html $mime_type $content] # we don't want to stomp on the set current_user_id [ad_conn user_id] if {[string equal $attachments_p "t"] && [info exists id]} { db_multirow attachments get_attachments { - select object_id as file_id, cr.title, ci.name, - acs_permission.permission_p(object_id, :current_user_id, - 'bboard_write_message') as delete_p + select object_id as file_id, cr.title, ci.name from acs_objects ao, cr_items ci, cr_revisions cr where object_id = ci.item_id and live_revision = revision_id and