Allow unauthenticated access to enterprise API endpoints

This commit is contained in:
Matt-Yorkley
2019-05-10 19:37:32 +01:00
parent 7e9a149c8d
commit 74d7db9fba

View File

@@ -77,5 +77,12 @@ module Api
def override_visible
params[:enterprise][:visible] = false
end
# Allows API access without a logged in user for actions in this controller.
# Actions that require authentication should all use #authorize!
# @current_api_user will now initialize an empty Spree::User unless one is present.
def requires_authentication?
false
end
end
end