Merge branch 'enforce-current-user-usage-on-entities' into 'master'

Make all Serializers receive `current_user` instead `user` [CE]

See merge request !11254
This commit is contained in:
Kamil Trzciński 2017-05-10 22:00:52 +00:00
commit bae0a060ea

View file

@ -6,7 +6,7 @@ class Projects::DeploymentsController < Projects::ApplicationController
deployments = environment.deployments.reorder(created_at: :desc)
deployments = deployments.where('created_at > ?', params[:after].to_time) if params[:after]&.to_time
render json: { deployments: DeploymentSerializer.new(user: @current_user, project: project)
render json: { deployments: DeploymentSerializer.new(project: project)
.represent_concise(deployments) }
end