Commit 3ba870f8 authored by Stephane Glondu's avatar Stephane Glondu

Keep CAS server address in deleted elections

parent 2400c14d
......@@ -104,7 +104,7 @@ type draft_election = {
(** {1 Types related to deleted elections} *)
type authentication_method = [ CAS | Password | Unknown ]
type authentication_method = [ CAS of string | Password | Unknown ]
type credential_method = [ Automatic | Manual ]
type deleted_election = {
......
......@@ -349,7 +349,9 @@ let delete_election uuid =
| None -> return default_validation_date
in
let de_authentication_method = match metadata.e_auth_config with
| Some [{auth_system = "cas"; _}] -> `CAS
| Some [{auth_system = "cas"; auth_config; _}] ->
let server = List.assoc "server" auth_config in
`CAS server
| Some [{auth_system = "password"; _}] -> `Password
| _ -> `Unknown
in
......
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