Commit 0a953f5f authored by Stephane Glondu's avatar Stephane Glondu

Change of terminology: setup -> draft

parent dee2d2fc
......@@ -56,7 +56,7 @@ into:
### Election life cycle
An election starts by being in preparation (or "setup mode"), then
An election starts by being in preparation (or "draft mode"), then
becomes finalized. Then, it is immediately opened and can be closed
and re-opened at will. When it is closed, the election administrator
can initiate the tallying process. The encrypted tally is then
......
......@@ -64,19 +64,19 @@ type election_dates = {
(** {1 Types related to elections being prepared} *)
type setup_voter = {
type draft_voter = {
id : string;
?password <ocaml mutable> : (string * string) option;
} <ocaml field_prefix="sv_">
type setup_trustee = {
type draft_trustee = {
id : string;
token : string;
public_key <ocaml mutable> : string;
?private_key : number option;
} <ocaml field_prefix="st_">
type setup_threshold_trustee = {
type draft_threshold_trustee = {
id : string;
token : string;
?step <ocaml mutable> : int option;
......@@ -86,17 +86,17 @@ type setup_threshold_trustee = {
?voutput <ocaml mutable> : string option;
} <ocaml field_prefix="stt_">
type setup_election = {
type draft_election = {
owner : user;
group : string;
voters <ocaml mutable> : setup_voter list;
voters <ocaml mutable> : draft_voter list;
questions <ocaml mutable> : template;
public_keys <ocaml mutable> : setup_trustee list;
public_keys <ocaml mutable> : draft_trustee list;
metadata <ocaml mutable> : metadata;
public_creds : string;
public_creds_received <ocaml mutable> : bool;
?threshold <ocaml mutable> : int option;
?threshold_trustees <ocaml mutable> : setup_threshold_trustee list option;
?threshold_trustees <ocaml mutable> : draft_threshold_trustee list option;
?threshold_parameters <ocaml mutable> : string option;
?threshold_error <ocaml mutable> : string option;
?creation_date : datetime option;
......
......@@ -34,47 +34,47 @@ let source_code = service ~path:["belenios.tar.gz"] ~get_params:unit ()
let tool = preapply (static_dir ()) ["static"; "belenios-tool.html"]
let election_setup_new = post_coservice ~csrf_safe:true ~fallback:admin ~post_params:(radio string "credmgmt" ** radio string "auth" ** string "cas_server") ()
let election_setup_pre = service ~path:["setup"; "new"] ~get_params:unit ()
let election_setup = service ~path:["setup"; "election"] ~get_params:(uuid "uuid") ()
let election_setup_questions = service ~path:["setup"; "questions"] ~get_params:(uuid "uuid") ()
let election_setup_questions_post = post_coservice ~fallback:election_setup_questions ~post_params:(string "questions") ()
let election_setup_description = post_coservice ~fallback:election_setup ~post_params:(string "name" ** string "description") ()
let election_setup_languages = post_coservice ~fallback:election_setup ~post_params:(string "languages") ()
let election_setup_contact = post_coservice ~fallback:election_setup ~post_params:(string "contact") ()
let election_setup_voters = service ~path:["setup"; "voters"] ~get_params:(uuid "uuid") ()
let election_setup_voters_add = post_service ~fallback:election_setup_voters ~post_params:(string "voters") ()
let election_setup_voters_remove = post_coservice ~fallback:election_setup_voters ~post_params:(string "voter") ()
let election_setup_voters_passwd = post_coservice ~fallback:election_setup_voters ~post_params:(string "voter") ()
let election_setup_trustee_add = post_coservice ~fallback:election_setup ~post_params:(string "id") ()
let election_setup_trustee_add_server = post_coservice ~fallback:election_setup ~post_params:unit ()
let election_setup_trustee_del = post_coservice ~fallback:election_setup ~post_params:(int "index") ()
let election_setup_credential_authority = service ~path:["setup"; "credential-authority"] ~get_params:(uuid "uuid") ()
let election_setup_credentials = service ~path:["setup"; "credentials"] ~get_params:(string "token") ()
let election_setup_credentials_post = post_service ~fallback:election_setup_credentials ~post_params:(string "public_creds") ()
let election_setup_credentials_post_file = post_service ~fallback:election_setup_credentials ~post_params:(file "public_creds") ()
let election_setup_credentials_server = post_coservice ~fallback:election_setup ~post_params:unit ()
let election_draft_new = post_coservice ~csrf_safe:true ~fallback:admin ~post_params:(radio string "credmgmt" ** radio string "auth" ** string "cas_server") ()
let election_draft_pre = service ~path:["draft"; "new"] ~get_params:unit ()
let election_draft = service ~path:["draft"; "election"] ~get_params:(uuid "uuid") ()
let election_draft_questions = service ~path:["draft"; "questions"] ~get_params:(uuid "uuid") ()
let election_draft_questions_post = post_coservice ~fallback:election_draft_questions ~post_params:(string "questions") ()
let election_draft_description = post_coservice ~fallback:election_draft ~post_params:(string "name" ** string "description") ()
let election_draft_languages = post_coservice ~fallback:election_draft ~post_params:(string "languages") ()
let election_draft_contact = post_coservice ~fallback:election_draft ~post_params:(string "contact") ()
let election_draft_voters = service ~path:["draft"; "voters"] ~get_params:(uuid "uuid") ()
let election_draft_voters_add = post_service ~fallback:election_draft_voters ~post_params:(string "voters") ()
let election_draft_voters_remove = post_coservice ~fallback:election_draft_voters ~post_params:(string "voter") ()
let election_draft_voters_passwd = post_coservice ~fallback:election_draft_voters ~post_params:(string "voter") ()
let election_draft_trustee_add = post_coservice ~fallback:election_draft ~post_params:(string "id") ()
let election_draft_trustee_add_server = post_coservice ~fallback:election_draft ~post_params:unit ()
let election_draft_trustee_del = post_coservice ~fallback:election_draft ~post_params:(int "index") ()
let election_draft_credential_authority = service ~path:["draft"; "credential-authority"] ~get_params:(uuid "uuid") ()
let election_draft_credentials = service ~path:["draft"; "credentials"] ~get_params:(string "token") ()
let election_draft_credentials_post = post_service ~fallback:election_draft_credentials ~post_params:(string "public_creds") ()
let election_draft_credentials_post_file = post_service ~fallback:election_draft_credentials ~post_params:(file "public_creds") ()
let election_draft_credentials_server = post_coservice ~fallback:election_draft ~post_params:unit ()
let election_setup_trustees = service ~path:["setup"; "trustees"] ~get_params:(uuid "uuid") ()
let election_setup_trustee = service ~path:["setup"; "trustee"] ~get_params:(string "token") ()
let election_setup_trustee_post = post_coservice ~fallback:election_setup_trustee ~post_params:(string "public_key") ()
let election_draft_trustees = service ~path:["draft"; "trustees"] ~get_params:(uuid "uuid") ()
let election_draft_trustee = service ~path:["draft"; "trustee"] ~get_params:(string "token") ()
let election_draft_trustee_post = post_coservice ~fallback:election_draft_trustee ~post_params:(string "public_key") ()
let election_setup_threshold_trustees = service ~path:["setup"; "threshold-trustees"] ~get_params:(uuid "uuid") ()
let election_setup_threshold_trustee = service ~path:["setup"; "threshold-trustee"] ~get_params:(string "token") ()
let election_setup_threshold_trustee_post = post_coservice ~fallback:election_setup_threshold_trustee ~post_params:(string "data") ()
let election_setup_threshold_set = post_coservice ~fallback:election_setup_threshold_trustees ~post_params:(int "threshold") ()
let election_setup_threshold_trustee_add = post_coservice ~fallback:election_setup_threshold_trustees ~post_params:(string "id") ()
let election_setup_threshold_trustee_del = post_coservice ~fallback:election_setup_threshold_trustees ~post_params:(int "index") ()
let election_draft_threshold_trustees = service ~path:["draft"; "threshold-trustees"] ~get_params:(uuid "uuid") ()
let election_draft_threshold_trustee = service ~path:["draft"; "threshold-trustee"] ~get_params:(string "token") ()
let election_draft_threshold_trustee_post = post_coservice ~fallback:election_draft_threshold_trustee ~post_params:(string "data") ()
let election_draft_threshold_set = post_coservice ~fallback:election_draft_threshold_trustees ~post_params:(int "threshold") ()
let election_draft_threshold_trustee_add = post_coservice ~fallback:election_draft_threshold_trustees ~post_params:(string "id") ()
let election_draft_threshold_trustee_del = post_coservice ~fallback:election_draft_threshold_trustees ~post_params:(int "index") ()
let election_setup_confirm = service ~path:["setup"; "confirm"] ~get_params:(uuid "uuid") ()
let election_setup_create = post_coservice ~csrf_safe:true ~fallback:election_setup ~post_params:unit ()
let election_setup_destroy = post_coservice ~csrf_safe:true ~fallback:election_setup ~post_params:unit ()
let election_setup_auth_genpwd = post_coservice ~fallback:election_setup ~post_params:unit ()
let election_draft_confirm = service ~path:["draft"; "confirm"] ~get_params:(uuid "uuid") ()
let election_draft_create = post_coservice ~csrf_safe:true ~fallback:election_draft ~post_params:unit ()
let election_draft_destroy = post_coservice ~csrf_safe:true ~fallback:election_draft ~post_params:unit ()
let election_draft_auth_genpwd = post_coservice ~fallback:election_draft ~post_params:unit ()
let election_setup_import = service ~path:["setup"; "import"] ~get_params:(uuid "uuid") ()
let election_setup_import_post = post_coservice ~fallback:election_setup_import ~post_params:(uuid "from") ()
let election_setup_import_trustees = service ~path:["setup"; "import-trustees"] ~get_params:(uuid "uuid") ()
let election_setup_import_trustees_post = post_coservice ~fallback:election_setup_import_trustees ~post_params:(uuid "from") ()
let election_draft_import = service ~path:["draft"; "import"] ~get_params:(uuid "uuid") ()
let election_draft_import_post = post_coservice ~fallback:election_draft_import ~post_params:(uuid "from") ()
let election_draft_import_trustees = service ~path:["draft"; "import-trustees"] ~get_params:(uuid "uuid") ()
let election_draft_import_trustees_post = post_coservice ~fallback:election_draft_import_trustees ~post_params:(uuid "from") ()
let election_home = service ~path:["elections"] ~get_params:(suffix (uuid "uuid" ** suffix_const "")) ()
let set_cookie_disclaimer = coservice' ~get_params:unit ()
......
This diff is collapsed.
This diff is collapsed.
......@@ -37,19 +37,19 @@ val generic_page : title:string ->
Eliom_service.service ->
string -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_pre : unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup : uuid -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_voters : uuid -> setup_election -> int -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_questions : uuid -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_credential_authority : uuid -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_credentials : string -> uuid -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_trustees : uuid -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_threshold_trustees : uuid -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_trustee : string -> uuid -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_threshold_trustee : string -> uuid -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_import : uuid -> setup_election -> 'a election list * 'a election list * 'a election list -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_import_trustees : uuid -> setup_election -> 'a election list * 'a election list * 'a election list -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_confirm : uuid -> setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_draft_pre : unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_draft : uuid -> draft_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_draft_voters : uuid -> draft_election -> int -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_draft_questions : uuid -> draft_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_draft_credential_authority : uuid -> draft_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_draft_credentials : string -> uuid -> draft_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_draft_trustees : uuid -> draft_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_draft_threshold_trustees : uuid -> draft_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_draft_trustee : string -> uuid -> draft_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_draft_threshold_trustee : string -> uuid -> draft_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_draft_import : uuid -> draft_election -> 'a election list * 'a election list * 'a election list -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_draft_import_trustees : uuid -> draft_election -> 'a election list * 'a election list * 'a election list -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_draft_confirm : uuid -> draft_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_home : 'a election -> Web_persist.election_state -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_admin : 'a election -> Web_serializable_j.metadata -> Web_persist.election_state -> (unit -> string list Lwt.t) -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
......
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