Commit 63185a6e authored by Vitali Tatarintev's avatar Vitali Tatarintev

Merge branch 'pl-fix-operations-settings-wo-pipelines' into 'master'

Fix operations settings when Pipelines are disabled

See merge request gitlab-org/gitlab!47062
parents 779e8f7a 9a6a1f97
......@@ -302,7 +302,7 @@ module ProjectsHelper
end
def settings_operations_available?
can?(current_user, :read_environment, @project)
!@project.archived? && can?(current_user, :admin_operations, @project)
end
def error_tracking_setting_project_json
......
......@@ -423,7 +423,7 @@
= link_to project_settings_ci_cd_path(@project), title: _('CI / CD') do
%span
= _('CI / CD')
- if !@project.archived? && settings_operations_available?
- if settings_operations_available?
= nav_link(controller: [:operations]) do
= link_to project_settings_operations_path(@project), title: _('Operations'), data: { qa_selector: 'operations_settings_link' } do
= _('Operations')
......
- return unless can?(current_user, :read_environment, @project)
- return unless can?(current_user, :admin_operations, @project)
- setting = error_tracking_setting
......
---
title: Fix operations settings when Pipelines are disabled
merge_request: 47062
author:
type: fixed
......@@ -25,7 +25,7 @@ RSpec.describe 'projects/settings/operations/show' do
end
before_all do
project.add_reporter(user)
project.add_maintainer(user)
end
before do
......
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