Commit 1c5ecd1a authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Show confirmation before logout

With some CAS servers, logging out doesn't redirect back to the site,
and the confirmation page may be missed. Instead, we show the
confirmation page with a link to logout.
parent 39394af6
...@@ -432,12 +432,9 @@ module Make (D : ELECTION_DATA) (P : WEB_PARAMS) : REGISTRABLE = struct ...@@ -432,12 +432,9 @@ module Make (D : ELECTION_DATA) (P : WEB_PARAMS) : REGISTRABLE = struct
in in
Eliom_reference.unset ballot >> Eliom_reference.unset ballot >>
Eliom_reference.set cast_confirmed (Some result) >> Eliom_reference.set cast_confirmed (Some result) >>
let cont () () = Redirection.send
Redirection.send (Eliom_service.preapply
(Eliom_service.preapply election_home (W.election.e_params.e_uuid, ()))
election_home (W.election.e_params.e_uuid, ()))
in
W.H.do_logout cont ()
) else forbidden () ) else forbidden ()
| None -> forbidden () | None -> forbidden ()
end end
......
...@@ -796,10 +796,10 @@ module Make (S : AUTH_SERVICES) : TEMPLATES = struct ...@@ -796,10 +796,10 @@ module Make (S : AUTH_SERVICES) : TEMPLATES = struct
p [ p [
(let service = (let service =
Eliom_service.preapply Eliom_service.preapply
election_home (params.e_uuid, ()) election_logout (params.e_uuid, ())
in in
a ~service [ a ~service [
pcdata "Go back to election" pcdata "Log out"
] ()); ] ());
pcdata "."; pcdata ".";
]; ];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment