Index: openacs-4/packages/forums/tcl/forums-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/forums-callback-procs.tcl,v diff -u -r1.9.2.2 -r1.9.2.3 --- openacs-4/packages/forums/tcl/forums-callback-procs.tcl 2 Jan 2016 19:20:42 -0000 1.9.2.2 +++ openacs-4/packages/forums/tcl/forums-callback-procs.tcl 2 Jul 2016 10:19:57 -0000 1.9.2.3 @@ -15,30 +15,33 @@ # Check for admin on the package... if {[permission::permission_p -object_id $package_id -privilege admin -party_id $user_id]} { - lappend actions [list LINK admin/ [_ acs-kernel.common_Administration] {} [_ forums.Admin_for_all]] - - lappend actions [list LINK \ - [export_vars -base admin/permissions {{object_id $package_id}}] \ - [_ acs-kernel.common_Permissions] {} [_ forums.Permissions_for_all]] - lappend actions [list LINK admin/forum-new [_ forums.Create_a_New_Forum] {} {}] + lappend actions \ + [list LINK \ + admin/ \ + [_ acs-kernel.common_Administration] {} [_ forums.Admin_for_all]] \ + [list LINK \ + [export_vars -base admin/permissions {{object_id $package_id}}] \ + [_ acs-kernel.common_Permissions] {} [_ forums.Permissions_for_all]] \ + [list LINK admin/forum-new [_ forums.Create_a_New_Forum] {} {}] } # check for admin on the individual forums. db_foreach forums { select forum_id, name, enabled_p from forums_forums where package_id = :package_id - and exists (select 1 from acs_object_party_privilege_map pm - where pm.object_id = forum_id - and pm.party_id = :user_id - and pm.privilege = 'admin') } { - lappend actions [list SECTION "Forum $name ([ad_decode $enabled_p t [_ forums.enabled] [_ forums.disabled]])" {}] + if {[permission::permission_p -object_id $forum_id -privilege admin -party_id $user_id]} { - lappend actions [list LINK [export_vars -base admin/forum-edit forum_id] \ - [_ forums.Edit_forum_name] {} {}] - lappend actions [list LINK [export_vars -base admin/permissions {{object_id $forum_id} return_url}] \ - [_ forums.Permission_forum_name] {} {}] + lappend actions \ + [list SECTION "Forum $name ([ad_decode $enabled_p t [_ forums.enabled] [_ forums.disabled]])" {}] \ + [list LINK \ + [export_vars -base admin/forum-edit forum_id] \ + [_ forums.Edit_forum_name] {} {}] \ + [list LINK \ + [export_vars -base admin/permissions {{object_id $forum_id} return_url}] \ + [_ forums.Permission_forum_name] {} {}] + } } return $actions }