Commit ba319b28 authored by Winnie Hellmann's avatar Winnie Hellmann

Resolve conflicts in app/serializers/environment_entity.rb

parent d92f177a
...@@ -10,11 +10,8 @@ class EnvironmentEntity < Grape::Entity ...@@ -10,11 +10,8 @@ class EnvironmentEntity < Grape::Entity
expose :environment_type expose :environment_type
expose :last_deployment, using: DeploymentEntity expose :last_deployment, using: DeploymentEntity
expose :stop_action?, as: :has_stop_action expose :stop_action?, as: :has_stop_action
<<<<<<< HEAD
expose :rollout_status, if: -> (*) { can_read_deploy_board? }, using: RolloutStatusEntity expose :rollout_status, if: -> (*) { can_read_deploy_board? }, using: RolloutStatusEntity
=======
>>>>>>> upstream/master
expose :metrics_path, if: -> (*) { environment.has_metrics? } do |environment| expose :metrics_path, if: -> (*) { environment.has_metrics? } do |environment|
metrics_project_environment_path(environment.project, environment) metrics_project_environment_path(environment.project, environment)
...@@ -45,7 +42,6 @@ class EnvironmentEntity < Grape::Entity ...@@ -45,7 +42,6 @@ class EnvironmentEntity < Grape::Entity
private private
<<<<<<< HEAD
alias_method :environment, :object alias_method :environment, :object
def current_user def current_user
...@@ -55,9 +51,4 @@ class EnvironmentEntity < Grape::Entity ...@@ -55,9 +51,4 @@ class EnvironmentEntity < Grape::Entity
def can_read_deploy_board? def can_read_deploy_board?
can?(current_user, :read_deploy_board, environment.project) can?(current_user, :read_deploy_board, environment.project)
end end
=======
def current_user
request.current_user
end
>>>>>>> upstream/master
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment