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
d0638a0c
Commit
d0638a0c
authored
Jan 15, 2020
by
Fabio Huser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose missing disable mention value on group API
parent
59ec1084
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
0 deletions
+9
-0
doc/api/groups.md
doc/api/groups.md
+5
-0
lib/api/entities.rb
lib/api/entities.rb
+1
-0
lib/api/helpers/groups_helpers.rb
lib/api/helpers/groups_helpers.rb
+1
-0
spec/requests/api/groups_spec.rb
spec/requests/api/groups_spec.rb
+2
-0
No files found.
doc/api/groups.md
View file @
d0638a0c
...
...
@@ -40,6 +40,7 @@ GET /groups
"auto_devops_enabled"
:
null
,
"subgroup_creation_level"
:
"owner"
,
"emails_disabled"
:
null
,
"mentions_disabled"
:
null
,
"lfs_enabled"
:
true
,
"avatar_url"
:
"http://localhost:3000/uploads/group/avatar/1/foo.jpg"
,
"web_url"
:
"http://localhost:3000/groups/foo-bar"
,
...
...
@@ -73,6 +74,7 @@ GET /groups?statistics=true
"auto_devops_enabled"
:
null
,
"subgroup_creation_level"
:
"owner"
,
"emails_disabled"
:
null
,
"mentions_disabled"
:
null
,
"lfs_enabled"
:
true
,
"avatar_url"
:
"http://localhost:3000/uploads/group/avatar/1/foo.jpg"
,
"web_url"
:
"http://localhost:3000/groups/foo-bar"
,
...
...
@@ -144,6 +146,7 @@ GET /groups/:id/subgroups
"auto_devops_enabled"
:
null
,
"subgroup_creation_level"
:
"owner"
,
"emails_disabled"
:
null
,
"mentions_disabled"
:
null
,
"lfs_enabled"
:
true
,
"avatar_url"
:
"http://gitlab.example.com/uploads/group/avatar/1/foo.jpg"
,
"web_url"
:
"http://gitlab.example.com/groups/foo-bar"
,
...
...
@@ -486,6 +489,7 @@ Parameters:
|
`auto_devops_enabled`
| boolean | no | Default to Auto DevOps pipeline for all projects within this group. |
|
`subgroup_creation_level`
| integer | no | Allowed to create subgroups. Can be
`owner`
(Owners), or
`maintainer`
(Maintainers). |
|
`emails_disabled`
| boolean | no | Disable email notifications |
|
`mentions_disabled`
| boolean | no | Disable the capability of a group from getting mentioned |
|
`lfs_enabled`
| boolean | no | Enable/disable Large File Storage (LFS) for the projects in this group. |
|
`request_access_enabled`
| boolean | no | Allow users to request member access. |
|
`parent_id`
| integer | no | The parent group ID for creating nested group. |
...
...
@@ -531,6 +535,7 @@ PUT /groups/:id
|
`auto_devops_enabled`
| boolean | no | Default to Auto DevOps pipeline for all projects within this group. |
|
`subgroup_creation_level`
| integer | no | Allowed to create subgroups. Can be
`owner`
(Owners), or
`maintainer`
(Maintainers). |
|
`emails_disabled`
| boolean | no | Disable email notifications |
|
`mentions_disabled`
| boolean | no | Disable the capability of a group from getting mentioned |
|
`lfs_enabled`
(optional) | boolean | no | Enable/disable Large File Storage (LFS) for the projects in this group. |
|
`request_access_enabled`
| boolean | no | Allow users to request member access. |
|
`file_template_project_id`
| integer | no |
**(PREMIUM)**
The ID of a project to load custom file templates from. |
...
...
lib/api/entities.rb
View file @
d0638a0c
...
...
@@ -414,6 +414,7 @@ module API
expose
:auto_devops_enabled
expose
:subgroup_creation_level_str
,
as: :subgroup_creation_level
expose
:emails_disabled
expose
:mentions_disabled
expose
:lfs_enabled?
,
as: :lfs_enabled
expose
:avatar_url
do
|
group
,
options
|
group
.
avatar_url
(
only_path:
false
)
...
...
lib/api/helpers/groups_helpers.rb
View file @
d0638a0c
...
...
@@ -18,6 +18,7 @@ module API
optional
:auto_devops_enabled
,
type:
Boolean
,
desc:
'Default to Auto DevOps pipeline for all projects within this group'
optional
:subgroup_creation_level
,
type:
String
,
values:
::
Gitlab
::
Access
.
subgroup_creation_string_values
,
desc:
'Allowed to create subgroups'
,
as: :subgroup_creation_level_str
optional
:emails_disabled
,
type:
Boolean
,
desc:
'Disable email notifications'
optional
:mentions_disabled
,
type:
Boolean
,
desc:
'Disable a group from getting mentioned'
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'
end
...
...
spec/requests/api/groups_spec.rb
View file @
d0638a0c
...
...
@@ -358,6 +358,7 @@ describe API::Groups do
expect
(
json_response
[
'two_factor_grace_period'
]).
to
eq
(
group1
.
two_factor_grace_period
)
expect
(
json_response
[
'auto_devops_enabled'
]).
to
eq
(
group1
.
auto_devops_enabled
)
expect
(
json_response
[
'emails_disabled'
]).
to
eq
(
group1
.
emails_disabled
)
expect
(
json_response
[
'mentions_disabled'
]).
to
eq
(
group1
.
mentions_disabled
)
expect
(
json_response
[
'project_creation_level'
]).
to
eq
(
'maintainer'
)
expect
(
json_response
[
'subgroup_creation_level'
]).
to
eq
(
'maintainer'
)
expect
(
json_response
[
'web_url'
]).
to
eq
(
group1
.
web_url
)
...
...
@@ -556,6 +557,7 @@ describe API::Groups do
expect
(
json_response
[
'two_factor_grace_period'
]).
to
eq
(
48
)
expect
(
json_response
[
'auto_devops_enabled'
]).
to
eq
(
nil
)
expect
(
json_response
[
'emails_disabled'
]).
to
eq
(
nil
)
expect
(
json_response
[
'mentions_disabled'
]).
to
eq
(
nil
)
expect
(
json_response
[
'project_creation_level'
]).
to
eq
(
"noone"
)
expect
(
json_response
[
'subgroup_creation_level'
]).
to
eq
(
"maintainer"
)
expect
(
json_response
[
'request_access_enabled'
]).
to
eq
(
true
)
...
...
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