Commit 789eb36c authored by haseeb's avatar haseeb Committed by Rémy Coutable

Remove authentication for readonly endpoints in issues API

parent 984e0f1a
---
title: made listing and showing public issue apis available without authentication
merge_request: 18638
author: haseebeqx
type: changed
...@@ -2,7 +2,7 @@ module API ...@@ -2,7 +2,7 @@ module API
class Issues < Grape::API class Issues < Grape::API
include PaginationParams include PaginationParams
before { authenticate! } before { authenticate_non_get! }
helpers ::Gitlab::IssuableMetadata helpers ::Gitlab::IssuableMetadata
...@@ -70,6 +70,7 @@ module API ...@@ -70,6 +70,7 @@ module API
desc: 'Return issues for the given scope: `created-by-me`, `assigned-to-me` or `all`' desc: 'Return issues for the given scope: `created-by-me`, `assigned-to-me` or `all`'
end end
get do get do
authenticate! unless params[:scope] == 'all'
issues = paginate(find_issues) issues = paginate(find_issues)
options = { options = {
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment