mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-12-04 20:19:04 +01:00
Catch :warden correctly
This commit is contained in:
parent
feda1e6554
commit
b078885414
1 changed files with 4 additions and 7 deletions
|
@ -9,14 +9,11 @@ module ApplicationCable
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def find_verified_user
|
def find_verified_user
|
||||||
|
catch :warden do
|
||||||
verified_user = env['warden'].user
|
verified_user = env['warden'].user
|
||||||
|
return verified_user if verified_user
|
||||||
if verified_user
|
|
||||||
verified_user
|
|
||||||
else
|
|
||||||
reject_unauthorized_connection
|
|
||||||
end
|
end
|
||||||
rescue :warden
|
|
||||||
reject_unauthorized_connection
|
reject_unauthorized_connection
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue