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
3bef9c0e
Commit
3bef9c0e
authored
5 years ago
by
Imre Farkas
Committed by
Lin Jen-Shin
5 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor EE specific params override in API::Groups
parent
52366f68
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
40 deletions
+37
-40
ee/lib/ee/api/helpers/groups_helpers.rb
ee/lib/ee/api/helpers/groups_helpers.rb
+10
-14
ee/spec/requests/api/members_spec.rb
ee/spec/requests/api/members_spec.rb
+2
-0
lib/api/groups.rb
lib/api/groups.rb
+1
-26
lib/api/helpers/groups_helpers.rb
lib/api/helpers/groups_helpers.rb
+24
-0
No files found.
ee/lib/ee/api/helpers/groups_helpers.rb
View file @
3bef9c0e
...
...
@@ -7,21 +7,17 @@ module EE
extend
ActiveSupport
::
Concern
prepended
do
included
do
helpers
do
params
:optional_params_ee
do
optional
:membership_lock
,
type:
::
Grape
::
API
::
Boolean
,
desc:
'Prevent adding new members to project membership within this group'
optional
:ldap_cn
,
type:
String
,
desc:
'LDAP Common Name'
optional
:ldap_access
,
type:
Integer
,
desc:
'A valid access level'
optional
:shared_runners_minutes_limit
,
type:
Integer
,
desc:
'(admin-only) Pipeline minutes quota for this group'
optional
:extra_shared_runners_minutes_limit
,
type:
Integer
,
desc:
'(admin-only) Extra pipeline minutes quota for this group'
all_or_none_of
:ldap_cn
,
:ldap_access
end
params
:optional_params_ee
do
optional
:membership_lock
,
type:
::
Grape
::
API
::
Boolean
,
desc:
'Prevent adding new members to project membership within this group'
optional
:ldap_cn
,
type:
String
,
desc:
'LDAP Common Name'
optional
:ldap_access
,
type:
Integer
,
desc:
'A valid access level'
optional
:shared_runners_minutes_limit
,
type:
Integer
,
desc:
'(admin-only) Pipeline minutes quota for this group'
optional
:extra_shared_runners_minutes_limit
,
type:
Integer
,
desc:
'(admin-only) Extra pipeline minutes quota for this group'
all_or_none_of
:ldap_cn
,
:ldap_access
end
params
:optional_update_params_ee
do
optional
:file_template_project_id
,
type:
Integer
,
desc:
'The ID of a project to use for custom templates in this group'
end
end
params
:optional_update_params_ee
do
optional
:file_template_project_id
,
type:
Integer
,
desc:
'The ID of a project to use for custom templates in this group'
end
end
end
...
...
This diff is collapsed.
Click to expand it.
ee/spec/requests/api/members_spec.rb
View file @
3bef9c0e
# frozen_string_literal: true
require
'spec_helper'
describe
API
::
Members
do
...
...
This diff is collapsed.
Click to expand it.
lib/api/groups.rb
View file @
3bef9c0e
...
...
@@ -7,34 +7,9 @@ module API
before
{
authenticate_non_get!
}
helpers
do
params
:optional_params_ce
do
optional
:description
,
type:
String
,
desc:
'The description of the group'
optional
:visibility
,
type:
String
,
values:
Gitlab
::
VisibilityLevel
.
string_values
,
default:
Gitlab
::
VisibilityLevel
.
string_level
(
Gitlab
::
CurrentSettings
.
current_application_settings
.
default_group_visibility
),
desc:
'The visibility of the group'
optional
:lfs_enabled
,
type:
Boolean
,
desc:
'Enable/disable LFS for the projects in this group'
optional
:request_access_enabled
,
type:
Boolean
,
desc:
'Allow users to request member access'
optional
:share_with_group_lock
,
type:
Boolean
,
desc:
'Prevent sharing a project with another group within this group'
end
params
:optional_params_ee
do
end
params
:optional_update_params_ee
do
end
end
include
::
API
::
Helpers
::
GroupsHelpers
helpers
Helpers
::
GroupsHelpers
helpers
do
params
:optional_params
do
use
:optional_params_ce
use
:optional_params_ee
end
params
:statistics_params
do
optional
:statistics
,
type:
Boolean
,
default:
false
,
desc:
'Include project statistics'
end
...
...
This diff is collapsed.
Click to expand it.
lib/api/helpers/groups_helpers.rb
View file @
3bef9c0e
...
...
@@ -4,6 +4,30 @@ module API
module
Helpers
module
GroupsHelpers
extend
ActiveSupport
::
Concern
extend
Grape
::
API
::
Helpers
params
:optional_params_ce
do
optional
:description
,
type:
String
,
desc:
'The description of the group'
optional
:visibility
,
type:
String
,
values:
Gitlab
::
VisibilityLevel
.
string_values
,
default:
Gitlab
::
VisibilityLevel
.
string_level
(
Gitlab
::
CurrentSettings
.
current_application_settings
.
default_group_visibility
),
desc:
'The visibility of the group'
optional
:lfs_enabled
,
type:
Boolean
,
desc:
'Enable/disable LFS for the projects in this group'
optional
:request_access_enabled
,
type:
Boolean
,
desc:
'Allow users to request member access'
optional
:share_with_group_lock
,
type:
Boolean
,
desc:
'Prevent sharing a project with another group within this group'
end
params
:optional_params_ee
do
end
params
:optional_update_params_ee
do
end
params
:optional_params
do
use
:optional_params_ce
use
:optional_params_ee
end
end
end
end
...
...
This diff is collapsed.
Click to expand it.
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