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.8 -r1.9 --- openacs-4/packages/forums/tcl/forums-security-procs.tcl 11 Dec 2003 21:40:04 -0000 1.8 +++ openacs-4/packages/forums/tcl/forums-security-procs.tcl 17 Dec 2003 15:45:30 -0000 1.9 @@ -138,7 +138,24 @@ } } -} + ad_proc -public permissions { + {-forum_id:required} + array_name + } { + upvar $array_name array + array set array [list admin_p [forum::security::can_admin_forum_p -forum_id $forum_id]] - + if { !$array(admin_p) } { + array set array [list moderate_p [forum::security::can_moderate_forum_p -forum_id $forum_id]] + if { !$array(moderate_p) } { + array set array [list post_p [expr { [ad_conn user_id] == 0 || [forum::security::can_post_forum_p -forum_id $forum_id] }]] + } else { + array set array [list post_p 1] + } + } else { + array set array [list moderate_p 1] + array set array [list post_p 1] + } + } +}