Diff
Modified: branches/event_logging/app/helpers/application_helper.rb (1934 => 1935)
--- branches/event_logging/app/helpers/application_helper.rb 2008-11-10 13:00:21 UTC (rev 1934)
+++ branches/event_logging/app/helpers/application_helper.rb 2008-11-10 13:18:05 UTC (rev 1935)
@@ -1798,6 +1798,7 @@
authorized = true
elsif ["invite", "request", "reject"].include? action
# only group admin OR the user in this action allowed to view
+ authorized = true
authorized = false if (contributor.nil? || current_viewer.nil? || current_viewer == 0)
authorized = (current_viewer_id == user_id || current_viewer_id == network_admin.id) if authorized
else
@@ -1850,6 +1851,7 @@
authorized = true
elsif ["create", "reject"].include? action
# only the "user" OR the "friend" in this action allowed to view
+ authorized = true
authorized = false if (contributor.nil? || current_viewer.nil? || current_viewer == 0)
authorized = (my_event || current_viewer_id == referenced_user.id) if authorized
else
Modified: branches/event_logging/app/views/networks/show.rhtml (1934 => 1935)
--- branches/event_logging/app/views/networks/show.rhtml 2008-11-10 13:00:21 UTC (rev 1934)
+++ branches/event_logging/app/views/networks/show.rhtml 2008-11-10 13:18:05 UTC (rev 1935)
@@ -150,7 +150,7 @@
<div class="tabTitle">News</div>
<div class="tabContent">
<% benchmark "Group page news feed" do %>
- <% viewer_id = (logged_in? ? current_user.id : nil) -%>
+ <% viewer_id = (logged_in? ? current_user.id : "public") -%>
<% cache_timeout({ :controller => 'news', :action ="" 'network_profile', :id => @network.id, :viewer => viewer_id } , NEWS_CACHE_TIMEOUT.seconds.from_now ) do -%>
<%= render :partial => "layouts/news", :locals => { :collection => news(@network, true, Time.now, Time.now-DEFAULT_GROUP_NEWS_TIMEFRAME, DEFAULT_GROUP_NEWS_COUNT, current_user) } %>
<% end -%>
Modified: branches/event_logging/app/views/users/show.rhtml (1934 => 1935)
--- branches/event_logging/app/views/users/show.rhtml 2008-11-10 13:00:21 UTC (rev 1934)
+++ branches/event_logging/app/views/users/show.rhtml 2008-11-10 13:18:05 UTC (rev 1935)
@@ -354,7 +354,7 @@
<% case @tab; when "News" %>
<% benchmark "User profile page news feed" do %>
- <% viewer_id = (logged_in? ? current_user.id : nil) -%>
+ <% viewer_id = (logged_in? ? current_user.id : "public") -%>
<% cache_timeout({ :controller => 'news', :action ="" 'user_profile', :id => @user.id, :viewer => viewer_id } , NEWS_CACHE_TIMEOUT.seconds.from_now ) do -%>
<%= render :partial => "layouts/news", :locals => { :collection => news(@user, true, Time.now, Time.now-DEFAULT_USER_NEWS_TIMEFRAME, DEFAULT_USER_NEWS_COUNT, current_user) } %>
<% end %>