FIX: Prevent unauthorized list of private message titles. Also remove some unused code.

This commit is contained in:
Robin Ward
2013-09-30 14:35:11 -04:00
parent 40c08eab14
commit 3f0c03a20c
5 changed files with 61 additions and 66 deletions

View File

@@ -16,15 +16,7 @@ class UserActionsController < ApplicationController
ignore_private_messages: params[:filter] ? false : true
}
stream =
if opts[:action_types] == [UserAction::GOT_PRIVATE_MESSAGE] ||
opts[:action_types] == [UserAction::NEW_PRIVATE_MESSAGE]
UserAction.private_message_stream(opts[:action_types][0], opts)
else
UserAction.stream(opts)
end
render_serialized(stream, UserActionSerializer, root: "user_actions")
render_serialized(UserAction.stream(opts), UserActionSerializer, root: "user_actions")
end
def show