Commit 64dc307a authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch 'sdesk-flag' into 'master'

Unify custom service desk name flags

See merge request gitlab-org/gitlab!29495
parents 31bda200 0bc3e90a
......@@ -11,7 +11,7 @@ module EE
before_action :log_unarchive_audit_event, only: [:unarchive]
before_action do
push_frontend_feature_flag(:service_desk_custom_address)
push_frontend_feature_flag(:service_desk_custom_address, @project)
end
end
......
......@@ -5,7 +5,7 @@ module ServiceDeskSettings
def execute
settings = ServiceDeskSetting.safe_find_or_create_by!(project_id: project.id)
unless ::Feature.enabled?(:service_desk_custom_address)
unless ::Feature.enabled?(:service_desk_custom_address, project)
params.delete(:project_key)
end
......
......@@ -69,7 +69,7 @@ module Gitlab
end
def valid_project_key?(project, slug)
project.present? && slug == project.full_path_slug && Feature.enabled?(:service_desk_email, project)
project.present? && slug == project.full_path_slug && Feature.enabled?(:service_desk_custom_address, project)
end
def create_issue!
......
......@@ -181,9 +181,9 @@ describe Gitlab::Email::Handler::EE::ServiceDeskHandler do
end
end
context 'when service_desk_email feature is disabled' do
context 'when service_desk_custom_address feature is disabled' do
before do
stub_feature_flags(service_desk_email: false)
stub_feature_flags(service_desk_custom_address: false)
end
it 'bounces the email' 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