Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/chat-portlet/www/chat-portlet-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/packages/chat-portlet/www/chat-portlet-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/chat-portlet/www/chat-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat-portlet/www/chat-portlet.tcl,v diff -u -r1.11 -r1.12 --- openacs-4/packages/chat-portlet/www/chat-portlet.tcl 1 Oct 2018 15:00:47 -0000 1.11 +++ openacs-4/packages/chat-portlet/www/chat-portlet.tcl 1 Oct 2018 15:10:14 -0000 1.12 @@ -37,19 +37,29 @@ set user_id [ad_conn user_id] set community_id [dotlrn_community::get_community_id] set room_create_p [permission::permission_p -object_id $user_id -privilege chat_room_create] -set num_rooms 0 if { $community_id eq 0 } { set query_name "rooms_list_all" } else { set query_name "rooms_list" } -db_multirow -extend { can_see_p room_enter_url } rooms $query_name {} { - set can_see_p 0 - if { $user_p || $admin_p } { - set can_see_p 1 - incr num_rooms - } +db_multirow -extend { + can_see_p + admin_p + user_p + base_url + room_enter_url +} rooms $query_name {} { + set admin_p [permission::permission_p \ + -object_id $room_id \ + -party_id $user_id \ + -privilege "chat_room_admin"] + set user_p [permission::permission_p \ + -object_id $room_id \ + -party_id $user_id \ + -privilege "chat_read"] + set base_url [lindex [site_node::get_url_from_object_id -object_id $context_id] 0] + set can_see_p [expr { $user_p || $admin_p }] set room_enter_url [export_vars -base "${base_url}room-enter" {room_id}] } @@ -66,5 +76,3 @@ label "[_ chat.Description]" } } - -ad_return_template Index: openacs-4/packages/chat-portlet/www/chat-portlet.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat-portlet/www/Attic/chat-portlet.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat-portlet/www/chat-portlet.xql 1 Oct 2018 15:10:14 -0000 1.1 @@ -0,0 +1,38 @@ + + + + + + select rm.room_id, + rm.pretty_name as pretty_name, + rm.description as description, + rm.moderated_p, + rm.active_p, + rm.archive_p, + obj.context_id + from chat_rooms rm, + acs_objects obj + where rm.room_id = obj.object_id + and obj.context_id IN ($sep_package_ids) + and rm.active_p = 't' + order by rm.pretty_name + + + + + + select rm.room_id, + rm.pretty_name as pretty_name, + rm.description as description, + rm.moderated_p, + rm.active_p, + rm.archive_p, + obj.context_id + from chat_rooms rm, + acs_objects obj + where rm.room_id = obj.object_id and rm.active_p = 't' + order by rm.pretty_name + + + +