mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Allow unauthenticated access to enterprise API endpoints
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user