Commit 7fea640d authored by Małgorzata Ksionek's avatar Małgorzata Ksionek

Add default_project_deletion_protection to api

And api spec
parent 17e2e536
......@@ -75,6 +75,7 @@ module EE
repository_mirror_attributes + %i[
email_additional_text
file_template_project_id
default_project_deletion_protection
]
end
end
......
......@@ -158,6 +158,7 @@ module EE
end)
expose :email_additional_text, if: ->(_instance, _opts) { ::License.feature_available?(:email_additional_text) }
expose :file_template_project_id, if: ->(_instance, _opts) { ::License.feature_available?(:custom_file_templates) }
expose :default_project_deletion_protection, if: ->(_instance, _opts) { ::License.feature_available?(:default_project_deletion_protection) }
end
end
......
......@@ -30,6 +30,7 @@ module EE
end
optional :email_additional_text, type: String, desc: 'Additional text added to the bottom of every email for legal/auditing/compliance reasons'
optional :default_project_deletion_protection, type: Grape::API::Boolean, desc: 'Disable project project owners ability to delete project'
optional :help_text, type: String, desc: 'GitLab server administrator information'
optional :repository_size_limit, type: Integer, desc: 'Size limit per repository (MB)'
optional :file_template_project_id, type: Integer, desc: 'ID of project where instance-level file templates are stored.'
......
......@@ -142,7 +142,7 @@ describe API::Settings, 'EE Settings' do
it_behaves_like 'settings for licensed features'
end
context 'mirroring settings' do
context 'default project deletion protection' do
let(:settings) { { default_project_deletion_protection: true } }
let(:feature) { :default_project_deletion_protection }
......
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