mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Merge pull request #3009 from HugsDaniel/authenticate-api-use-through-logged-in-user
[Spree Upgrade] Authenticate API user through logged in user
This commit is contained in:
@@ -13,5 +13,13 @@ module Api
|
||||
def respond_with_conflict(json_hash)
|
||||
render json: json_hash, status: :conflict
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# Use logged in user (spree_current_user) for API authentication (current_api_user)
|
||||
def authenticate_user
|
||||
@current_api_user = try_spree_current_user
|
||||
super
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user