Index: openacs-4/packages/forums/tcl/forums-security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/forums-security-procs.tcl,v diff -u -r1.23 -r1.24 --- openacs-4/packages/forums/tcl/forums-security-procs.tcl 25 Jun 2018 09:26:58 -0000 1.23 +++ openacs-4/packages/forums/tcl/forums-security-procs.tcl 28 Jun 2018 15:27:42 -0000 1.24 @@ -36,6 +36,8 @@ {-user_id ""} {-forum_id:required} } { + Abort if the user doesn't have 'read' permissions in the forum. + } { # Probably this whole proc could be replaced by just permission::require_permission if { ![permission::permission_p -party_id $user_id -object_id $forum_id -privilege "read"] } { do_abort @@ -46,6 +48,8 @@ {-user_id ""} {-forum_id:required} } { + @return 1 if the user can post in the forum, 0 otherwise. + } { set user_id [expr {$user_id eq "" ? [ad_conn user_id] : $user_id}] # Moderators can always post @@ -68,6 +72,8 @@ {-user_id ""} {-forum_id:required} } { + Abort if the user doesn't have permissions to post in the forum. + } { if {![can_post_forum_p -user_id $user_id -forum_id $forum_id]} { do_abort } @@ -88,6 +94,8 @@ {-user_id ""} {-forum_id:required} } { + Abort if the user doesn't have 'forum_moderate' permissions in the forum. + } { # Probably this whole proc could be replaced by just permission::require_permission if { ![permission::permission_p \ -party_id $user_id \