BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
2660e83c
Commit
2660e83c
authored
Dec 30, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add group filtering by name for API
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
da9d8279
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
groups.md
doc/api/groups.md
+2
-0
groups.rb
lib/api/groups.rb
+8
-5
No files found.
doc/api/groups.md
View file @
2660e83c
...
@@ -19,6 +19,8 @@ GET /groups
...
@@ -19,6 +19,8 @@ GET /groups
]
]
```
```
You can search for groups by name or path with:
`/groups?search=Rails`
## Details of a group
## Details of a group
Get all details of a group.
Get all details of a group.
...
...
lib/api/groups.rb
View file @
2660e83c
...
@@ -25,11 +25,14 @@ module API
...
@@ -25,11 +25,14 @@ module API
# Example Request:
# Example Request:
# GET /groups
# GET /groups
get
do
get
do
if
current_user
.
admin
@groups
=
if
current_user
.
admin
@groups
=
paginate
Group
Group
.
all
else
else
@groups
=
paginate
current_user
.
groups
current_user
.
groups
end
end
@groups
=
@groups
.
search
(
params
[
:search
])
if
params
[
:search
].
present?
@groups
=
paginate
@groups
present
@groups
,
with:
Entities
::
Group
present
@groups
,
with:
Entities
::
Group
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