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
7be19280
Commit
7be19280
authored
Jan 15, 2019
by
Robert Schilling
Committed by
Nick Thomas
Jan 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
API: Fix default branch protection setting for Admin API
parent
f06a9035
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
changelogs/unreleased/55111-gitlab-api-does-not-manage-default_branch_protection-3-value.yml
...api-does-not-manage-default_branch_protection-3-value.yml
+5
-0
lib/api/settings.rb
lib/api/settings.rb
+1
-1
spec/requests/api/settings_spec.rb
spec/requests/api/settings_spec.rb
+3
-1
No files found.
changelogs/unreleased/55111-gitlab-api-does-not-manage-default_branch_protection-3-value.yml
0 → 100644
View file @
7be19280
---
title
:
'
API:
Fix
default_branch_protection
admin
setting'
merge_request
:
24398
author
:
Robert Schilling
type
:
fixed
lib/api/settings.rb
View file @
7be19280
...
@@ -35,7 +35,7 @@ module API
...
@@ -35,7 +35,7 @@ module API
end
end
optional
:container_registry_token_expire_delay
,
type:
Integer
,
desc:
'Authorization token duration (minutes)'
optional
:container_registry_token_expire_delay
,
type:
Integer
,
desc:
'Authorization token duration (minutes)'
optional
:default_artifacts_expire_in
,
type:
String
,
desc:
"Set the default expiration time for each job's artifacts"
optional
:default_artifacts_expire_in
,
type:
String
,
desc:
"Set the default expiration time for each job's artifacts"
optional
:default_branch_protection
,
type:
Integer
,
values:
[
0
,
1
,
2
]
,
desc:
'Determine if developers can push to master'
optional
:default_branch_protection
,
type:
Integer
,
values:
Gitlab
::
Access
.
protection_values
,
desc:
'Determine if developers can push to master'
optional
:default_group_visibility
,
type:
String
,
values:
Gitlab
::
VisibilityLevel
.
string_values
,
desc:
'The default group visibility'
optional
:default_group_visibility
,
type:
String
,
values:
Gitlab
::
VisibilityLevel
.
string_values
,
desc:
'The default group visibility'
optional
:default_project_visibility
,
type:
String
,
values:
Gitlab
::
VisibilityLevel
.
string_values
,
desc:
'The default project visibility'
optional
:default_project_visibility
,
type:
String
,
values:
Gitlab
::
VisibilityLevel
.
string_values
,
desc:
'The default project visibility'
optional
:default_projects_limit
,
type:
Integer
,
desc:
'The maximum number of personal projects'
optional
:default_projects_limit
,
type:
Integer
,
desc:
'The maximum number of personal projects'
...
...
spec/requests/api/settings_spec.rb
View file @
7be19280
...
@@ -63,7 +63,8 @@ describe API::Settings, 'Settings' do
...
@@ -63,7 +63,8 @@ describe API::Settings, 'Settings' do
terms:
'Hello world!'
,
terms:
'Hello world!'
,
performance_bar_allowed_group_path:
group
.
full_path
,
performance_bar_allowed_group_path:
group
.
full_path
,
instance_statistics_visibility_private:
true
,
instance_statistics_visibility_private:
true
,
diff_max_patch_bytes:
150_000
diff_max_patch_bytes:
150_000
,
default_branch_protection:
Gitlab
::
Access
::
PROTECTION_DEV_CAN_MERGE
}
}
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
response
).
to
have_gitlab_http_status
(
200
)
...
@@ -88,6 +89,7 @@ describe API::Settings, 'Settings' do
...
@@ -88,6 +89,7 @@ describe API::Settings, 'Settings' do
expect
(
json_response
[
'performance_bar_allowed_group_id'
]).
to
eq
(
group
.
id
)
expect
(
json_response
[
'performance_bar_allowed_group_id'
]).
to
eq
(
group
.
id
)
expect
(
json_response
[
'instance_statistics_visibility_private'
]).
to
be
(
true
)
expect
(
json_response
[
'instance_statistics_visibility_private'
]).
to
be
(
true
)
expect
(
json_response
[
'diff_max_patch_bytes'
]).
to
eq
(
150_000
)
expect
(
json_response
[
'diff_max_patch_bytes'
]).
to
eq
(
150_000
)
expect
(
json_response
[
'default_branch_protection'
]).
to
eq
(
Gitlab
::
Access
::
PROTECTION_DEV_CAN_MERGE
)
end
end
end
end
...
...
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