mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-28 21:07:16 +00:00
Allow AuthorizationControl to run without Warden
As explained in 36c44a5487, it's not normally good to change production code to make testing easier.
But this tiny change makes it more robust, and enables much simpler specs.
This commit is contained in:
@@ -32,7 +32,7 @@ module DfcProvider
|
||||
end
|
||||
|
||||
def ofn_user
|
||||
@request.env['warden'].user
|
||||
@request.env['warden']&.user
|
||||
end
|
||||
|
||||
def decode_token
|
||||
|
||||
Reference in New Issue
Block a user