Skip to content

Commit

Permalink
Policial fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbutcher committed May 27, 2019
1 parent 55a3ad0 commit e60cc43
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/controllers/shopify_app/callback_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def callback
redirect_to return_address
else
flash[:error] = I18n.t('could_not_log_in')
redirect_to login_url_with_optional_shop
redirect_to(login_url_with_optional_shop)
end
end

Expand Down
24 changes: 14 additions & 10 deletions app/controllers/shopify_app/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def granted_storage_access
def destroy
reset_session
flash[:notice] = I18n.t('.logged_out')
redirect_to login_url_with_optional_shop
redirect_to(login_url_with_optional_shop)
end

private
Expand Down Expand Up @@ -110,7 +110,7 @@ def authenticate_in_context
end

def authenticate_at_top_level
fullpage_redirect_to login_url_with_optional_shop(top_level: true)
fullpage_redirect_to(login_url_with_optional_shop(top_level: true))
end

def authenticate_in_context?
Expand All @@ -128,14 +128,18 @@ def request_storage_access?
end

def redirect_to_request_storage_access
render :request_storage_access, layout: false, locals: {
does_not_have_storage_access_url: top_level_interaction_path(
shop: sanitized_shop_name
),
has_storage_access_url: login_url_with_optional_shop(top_level: true),
app_home_url: granted_storage_access_path(shop: sanitized_shop_name),
current_shopify_domain: current_shopify_domain
}
render(
:request_storage_access,
layout: false,
locals: {
does_not_have_storage_access_url: top_level_interaction_path(
shop: sanitized_shop_name
),
has_storage_access_url: login_url_with_optional_shop(top_level: true),
app_home_url: granted_storage_access_path(shop: sanitized_shop_name),
current_shopify_domain: current_shopify_domain,
}
)
end
end
end

0 comments on commit e60cc43

Please sign in to comment.