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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
502d6464
Commit
502d6464
authored
Aug 23, 2017
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow v4 API GET requests for groups to be unauthenticated
parent
99bb3dde
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lib/api/groups.rb
lib/api/groups.rb
+4
-4
No files found.
lib/api/groups.rb
View file @
502d6464
...
...
@@ -2,7 +2,7 @@ module API
class
Groups
<
Grape
::
API
include
PaginationParams
before
{
authenticate!
}
before
{
authenticate
_non_get
!
}
helpers
do
params
:optional_params_ce
do
...
...
@@ -48,10 +48,10 @@ module API
end
get
do
groups
=
if
params
[
:owned
]
current_user
.
owned_groups
elsif
current_user
.
admin
current_user
?
current_user
.
owned_groups
:
Group
.
none
elsif
current_user
&
.
admin?
Group
.
all
elsif
params
[
:all_available
]
elsif
params
[
:all_available
]
||
current_user
.
nil?
GroupsFinder
.
new
(
current_user
).
execute
else
current_user
.
groups
...
...
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