Commit 2563bb4c authored by Rémy Coutable's avatar Rémy Coutable

Merge branch '40855_remove_authentication_in_readonly_issue_api' into 'master'

Remove authentication for readonly endpoints in issues API

Closes #40855

See merge request gitlab-org/gitlab-ce!18638
parents 984e0f1a 789eb36c
---
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