From 41237f691f4c88c641ae4b54a2df8628feb142a1 Mon Sep 17 00:00:00 2001 From: "Hallvord R. M. Steen" Date: Thu, 22 Oct 2015 17:53:57 +0200 Subject: [PATCH] When issue lists rely on the label model, non-auth users should also get the full list from GitHub, #783 --- webcompat/api/endpoints.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/webcompat/api/endpoints.py b/webcompat/api/endpoints.py index 537d15f3b..a24190e69 100644 --- a/webcompat/api/endpoints.py +++ b/webcompat/api/endpoints.py @@ -264,14 +264,10 @@ def get_repo_labels(): Cached for 10 minutes. ''' - if g.user: - request_headers = get_request_headers(g.request_headers) - path = 'repos/{0}/labels'.format(REPO_PATH) - labels = github.raw_request('GET', path, headers=request_headers) - return (labels.content, labels.status_code, get_headers(labels)) - else: - # only authed users should be hitting this endpoint - abort(401) + request_headers = get_request_headers(g.request_headers) + path = 'repos/{0}/labels'.format(REPO_PATH) + labels = github.raw_request('GET', path, headers=request_headers) + return (labels.content, labels.status_code, get_headers(labels)) @api.route('/rate_limit')