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
in
Eliom_reference.unset ballot >>
Eliom_reference.set cast_confirmed (Some result) >>
let cont () () =
Redirection.send
(Eliom_service.preapply
election_home (W.election.e_params.e_uuid, ()))
in
W.H.do_logout cont ()
) else forbidden ()
| None -> forbidden ()
end
......
......@@ -796,10 +796,10 @@ module Make (S : AUTH_SERVICES) : TEMPLATES = struct
p [
(let service =
Eliom_service.preapply
election_home (params.e_uuid, ())
election_logout (params.e_uuid, ())
in
a ~service [
pcdata "Go back to election"
pcdata "Log out"
] ());
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