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
22c822d2
Commit
22c822d2
authored
Sep 19, 2016
by
Ruben Davila
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 8-12-stable-ee
Conflicts: lib/api/entities.rb lib/api/groups.rb
parents
a5b622ae
3e684d89
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
lib/api/entities.rb
lib/api/entities.rb
+1
-1
lib/api/groups.rb
lib/api/groups.rb
+3
-3
No files found.
lib/api/entities.rb
View file @
22c822d2
...
...
@@ -132,13 +132,13 @@ module API
class
Group
<
Grape
::
Entity
expose
:id
,
:name
,
:path
,
:description
,
:visibility_level
expose
:lfs_enabled?
,
as: :lfs_enabled
expose
:ldap_cn
,
:ldap_access
expose
:ldap_group_links
,
using:
Entities
::
LdapGroupLink
,
if:
lambda
{
|
group
,
options
|
group
.
ldap_group_links
.
any?
}
expose
:lfs_enabled?
,
as: :lfs_enabled
expose
:avatar_url
expose
:web_url
end
...
...
lib/api/groups.rb
View file @
22c822d2
...
...
@@ -27,16 +27,16 @@ module API
# path (required) - The path of the group
# description (optional) - The description of the group
# visibility_level (optional) - The visibility level of the group
# lfs_enabled (optional) - Enable/disable LFS for the projects in this group
# membership_lock (optional, boolean) - Prevent adding new members to project membership within this group
# share_with_group_lock (optional, boolean) - Prevent sharing a project with another group within this group
# lfs_enabled (optional) - Enable/disable LFS for the projects in this group
# Example Request:
# POST /groups
post
do
authorize!
:create_group
required_attributes!
[
:name
,
:path
]
attrs
=
attributes_for_keys
[
:name
,
:path
,
:description
,
:visibility_level
,
:
lfs_enabled
,
:membership_lock
,
:share_with_group_lock
]
attrs
=
attributes_for_keys
[
:name
,
:path
,
:description
,
:visibility_level
,
:
membership_lock
,
:share_with_group_lock
,
:lfs_enabled
]
@group
=
Group
.
new
(
attrs
)
if
@group
.
save
...
...
@@ -73,7 +73,7 @@ module API
group
=
find_group
(
params
[
:id
])
authorize!
:admin_group
,
group
attrs
=
attributes_for_keys
[
:name
,
:path
,
:description
,
:visibility_level
,
:
lfs_enabled
,
:membership_lock
,
:share_with_group_lock
]
attrs
=
attributes_for_keys
[
:name
,
:path
,
:description
,
:visibility_level
,
:
membership_lock
,
:share_with_group_lock
,
:lfs_enabled
]
if
::
Groups
::
UpdateService
.
new
(
group
,
current_user
,
attrs
).
execute
present
group
,
with:
Entities
::
GroupDetail
...
...
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