aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/info_request_event.rb23
-rw-r--r--app/views/admin_general/timeline.html.erb2
2 files changed, 1 insertions, 24 deletions
diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb
index 0967e3940..2350aea01 100644
--- a/app/models/info_request_event.rb
+++ b/app/models/info_request_event.rb
@@ -63,35 +63,12 @@ class InfoRequestEvent < ActiveRecord::Base
# user described state (also update in info_request)
validate :must_be_valid_state
- # whether event is publicly visible
- validates_inclusion_of :prominence, :in => [
- 'normal',
- 'hidden',
- 'requester_only'
- ]
-
def must_be_valid_state
if !described_state.nil? and !InfoRequest.enumerate_states.include?(described_state)
errors.add(described_state, "is not a valid state")
end
end
- def user_can_view?(user)
- unless info_request.user_can_view?(user)
- raise "internal error, called user_can_view? on event when there is not permission to view entire request"
- end
-
- case prominence
- when 'hidden'
- User.view_hidden_requests?(user)
- when 'requester_only'
- info_request.is_owning_user?(user)
- else
- true
- end
- end
-
-
# Full text search indexing
acts_as_xapian :texts => [ :search_text_main, :title ],
:values => [
diff --git a/app/views/admin_general/timeline.html.erb b/app/views/admin_general/timeline.html.erb
index 8fd8875b6..fe2221294 100644
--- a/app/views/admin_general/timeline.html.erb
+++ b/app/views/admin_general/timeline.html.erb
@@ -34,7 +34,7 @@
<%= request_both_links(event.info_request) %>
<% if event.event_type == 'edit' %>
was edited by administrator <strong><%=h event.params[:editor] %></strong>.
- <% for p in ['title', 'prominence', 'described_state', 'awaiting_description']
+ <% for p in ['title', 'described_state', 'awaiting_description']
if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
%> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%
end