Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7fea640d
Commit
7fea640d
authored
Jun 05, 2019
by
Małgorzata Ksionek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add default_project_deletion_protection to api
And api spec
parent
17e2e536
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
1 deletion
+4
-1
ee/app/helpers/ee/application_settings_helper.rb
ee/app/helpers/ee/application_settings_helper.rb
+1
-0
ee/lib/ee/api/entities.rb
ee/lib/ee/api/entities.rb
+1
-0
ee/lib/ee/api/helpers/settings_helpers.rb
ee/lib/ee/api/helpers/settings_helpers.rb
+1
-0
ee/spec/requests/api/settings_spec.rb
ee/spec/requests/api/settings_spec.rb
+1
-1
No files found.
ee/app/helpers/ee/application_settings_helper.rb
View file @
7fea640d
...
...
@@ -75,6 +75,7 @@ module EE
repository_mirror_attributes
+
%i[
email_additional_text
file_template_project_id
default_project_deletion_protection
]
end
end
...
...
ee/lib/ee/api/entities.rb
View file @
7fea640d
...
...
@@ -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
...
...
ee/lib/ee/api/helpers/settings_helpers.rb
View file @
7fea640d
...
...
@@ -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.'
...
...
ee/spec/requests/api/settings_spec.rb
View file @
7fea640d
...
...
@@ -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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment