Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(app-platform): Allow GET requests for published apps #14109

Merged
merged 2 commits into from
Jul 22, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/sentry/api/bases/sentryapps.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@ def has_object_permission(self, request, view, sentry_app):
if sentry_app.owner not in request.user.get_orgs():
raise Http404

# TODO(meredith): make a better way to allow for public
# endpoints. we can't use ensure_scoped_permission now
# that the public endpoint isn't denoted by '()'
if sentry_app.is_published and request.method == 'GET':
return True

return ensure_scoped_permission(
request,
self._scopes_for_sentry_app(sentry_app).get(request.method),
Expand Down