diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-30 15:09:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-30 15:09:03 +0300 |
commit | b0139a824fba85e5b71e69f2c99d423700ff76cc (patch) | |
tree | 0be37882f9bdaf64d6bc8bcd486d0e1066124513 /app/serializers | |
parent | 312ac59328577a230a049eb71c56f648508d209f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/environment_entity.rb | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/app/serializers/environment_entity.rb b/app/serializers/environment_entity.rb index ac99463bd64..3473b4aebc8 100644 --- a/app/serializers/environment_entity.rb +++ b/app/serializers/environment_entity.rb @@ -66,22 +66,6 @@ class EnvironmentEntity < Grape::Entity environment.available? && can?(current_user, :stop_environment, environment) end - expose :logs_path, if: -> (*) { can_read_pod_logs? } do |environment| - project_logs_path(environment.project, environment_name: environment.name) - end - - expose :logs_api_path, if: -> (*) { can_read_pod_logs? } do |environment| - if environment.elastic_stack_available? - elasticsearch_project_logs_path(environment.project, environment_name: environment.name, format: :json) - else - k8s_project_logs_path(environment.project, environment_name: environment.name, format: :json) - end - end - - expose :enable_advanced_logs_querying, if: -> (*) { can_read_pod_logs? } do |environment| - environment.elastic_stack_available? - end - expose :can_delete do |environment| can?(current_user, :destroy_environment, environment) end @@ -102,11 +86,6 @@ class EnvironmentEntity < Grape::Entity can?(current_user, :update_environment, environment) end - def can_read_pod_logs? - Feature.enabled?(:monitor_logging, environment.project) && - can?(current_user, :read_pod_logs, environment.project) - end - def can_read_deploy_board? can?(current_user, :read_deploy_board, environment.project) end |