mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Catch :warden correctly
This commit is contained in:
parent
feda1e6554
commit
b078885414
@ -9,14 +9,11 @@ module ApplicationCable
|
||||
protected
|
||||
|
||||
def find_verified_user
|
||||
verified_user = env['warden'].user
|
||||
|
||||
if verified_user
|
||||
verified_user
|
||||
else
|
||||
reject_unauthorized_connection
|
||||
catch :warden do
|
||||
verified_user = env['warden'].user
|
||||
return verified_user if verified_user
|
||||
end
|
||||
rescue :warden
|
||||
|
||||
reject_unauthorized_connection
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user