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

SJ - Fixing service search when not logged in #2064

Merged
merged 1 commit into from Nov 13, 2019

Conversation

Stuart-Johnson
Copy link
Collaborator

Request format for services search was json, and code was only allowing js past the check.

[#169708113]

https://www.pivotaltracker.com/story/show/169708113

Copy link
Contributor

@kayla-glick kayla-glick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

@@ -171,7 +171,7 @@ def initialize_service_request

def authorize_identity
# If the request is in first_draft status
if @service_request.status == 'first_draft' && (action_name == 'catalog' || (Rails.application.routes.recognize_path(request.referrer)[:action] == 'catalog' && request.format.js?))
if @service_request.status == 'first_draft' && (action_name == 'catalog' || (Rails.application.routes.recognize_path(request.referrer)[:action] == 'catalog' && (request.format.js? || request.format.json?)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I'm wondering if it would be better to do !request.format.html? to cover all cases?

@Stuart-Johnson Stuart-Johnson merged commit 38aeb13 into v3.6.0 Nov 13, 2019
@Stuart-Johnson Stuart-Johnson deleted the sj-fixing_service_search branch November 13, 2019 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants