Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
ae95d4ba
Commit
ae95d4ba
authored
Nov 29, 2019
by
Greg Messner
Browse files
Fixed level parameter values (#482)
parent
a4e57f2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/models/GroupParams.java
View file @
ae95d4ba
...
...
@@ -149,9 +149,9 @@ public class GroupParams {
.
withParam
(
"share_with_group_lock"
,
shareWithGroupLock
)
.
withParam
(
"require_two_factor_authentication"
,
requireTwoFactorAuthentication
)
.
withParam
(
"two_factor_grace_period"
,
twoFactorGracePeriod
)
.
withParam
(
"project_creation_level"
,
projectCreationLevel
)
.
withParam
(
"project_creation_level"
,
getAccessLevelString
(
projectCreationLevel
)
)
.
withParam
(
"auto_devops_enabled"
,
autoDevopsEnabled
)
.
withParam
(
"subgroup_creation_level"
,
subgroupCreationLevel
)
.
withParam
(
"subgroup_creation_level"
,
getAccessLevelString
(
subgroupCreationLevel
)
)
.
withParam
(
"emails_disabled"
,
emailsDisabled
)
.
withParam
(
"lfs_enabled"
,
lfsEnabled
)
.
withParam
(
"request_access_enabled"
,
requestAccessEnabled
)
...
...
@@ -167,4 +167,26 @@ public class GroupParams {
return
(
form
);
}
private
String
getAccessLevelString
(
AccessLevel
level
)
{
if
(
level
==
null
)
{
return
null
;
}
switch
(
level
)
{
case
NONE:
return
"noone"
;
case
DEVELOPER:
return
"developer"
;
case
MAINTAINER:
return
"maintainer"
;
default
:
throw
new
RuntimeException
(
"Invalid access level"
);
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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