13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/booth/userland/sessions/transitions/show/enter_webauth.rb', line 13
def call
if sudo.webauth?
if session_id_param
debug { 'Having webauth sudo, revoking the desired session...' }
return ::Booth::Sessions::Revoke.call credential_id: authentication.credential_id,
session_id: session_id_param
else
debug { 'Having webauth sudo, revoking all other sessions...' }
return ::Booth::Sessions::RevokeAllOthers.call credential_id: authentication.credential_id,
surviving_session_id: authentication.session_id
end
end
if session_id_param
Tron.failure :need_sudo_to_show_session,
step: :enter_webauth_to_show,
session_id: session_id_param
else
Tron.failure :need_sudo_to_show_all_other_sessions,
step: :enter_webauth_to_show_all_others
end
end
|