Maj terminée. Pour consulter la release notes associée voici le lien :
https://about.gitlab.com/releases/2021/07/07/critical-security-release-gitlab-14-0-4-released/

Commit 28bad477 authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Rename "data" into "election_web" where appropriate

parent 5f7a82bc
...@@ -148,7 +148,7 @@ lwt election_table = ...@@ -148,7 +148,7 @@ lwt election_table =
return (Web_common.SSet.mem (Web_common.string_of_user u) set) return (Web_common.SSet.mem (Web_common.string_of_user u) set)
) )
in in
let election_data = Web_common.({ let election_web = Web_common.({
fn_params; fn_params;
fingerprint; fingerprint;
params; params;
...@@ -175,7 +175,7 @@ lwt election_table = ...@@ -175,7 +175,7 @@ lwt election_table =
module P = P module P = P
module E = Election.MakeElection(P)(M) module E = Election.MakeElection(P)(M)
module B = Web_common.MakeBallotBox(P)(E) module B = Web_common.MakeBallotBox(P)(E)
let data = election_data let election_web = election_web
end in end in
X.B.inject_creds public_creds >> X.B.inject_creds public_creds >>
let uuid = params.e_uuid in let uuid = params.e_uuid in
...@@ -194,7 +194,7 @@ let get_election_by_uuid x = ...@@ -194,7 +194,7 @@ let get_election_by_uuid x =
let get_featured_elections () = let get_featured_elections () =
EMap.fold (fun uuid e res -> EMap.fold (fun uuid e res ->
let module X = (val e : Web_common.WEB_ELECTION) in let module X = (val e : Web_common.WEB_ELECTION) in
let e = X.data in let e = X.election_web in
if e.Web_common.featured_p then e::res else res if e.Web_common.featured_p then e::res else res
) election_table [] |> return ) election_table [] |> return
...@@ -219,7 +219,7 @@ let if_eligible acl f uuid x = ...@@ -219,7 +219,7 @@ let if_eligible acl f uuid x =
lwt election = get_election_by_uuid uuid in lwt election = get_election_by_uuid uuid in
let module X = (val election : Web_common.WEB_ELECTION) in let module X = (val election : Web_common.WEB_ELECTION) in
lwt user = Eliom_reference.get Services.user in lwt user = Eliom_reference.get Services.user in
lwt b = check_acl acl X.data user in lwt b = check_acl acl X.election_web user in
if b then f uuid election user x else forbidden () if b then f uuid election user x else forbidden ()
let () = let () =
...@@ -380,7 +380,7 @@ let () = Eliom_registration.File.register ...@@ -380,7 +380,7 @@ let () = Eliom_registration.File.register
(if_eligible can_read (if_eligible can_read
(fun uuid election user () -> (fun uuid election user () ->
let module X = (val election : Web_common.WEB_ELECTION) in let module X = (val election : Web_common.WEB_ELECTION) in
return X.data.Web_common.fn_params return X.election_web.Web_common.fn_params
) )
) )
...@@ -390,7 +390,7 @@ let () = Eliom_registration.File.register ...@@ -390,7 +390,7 @@ let () = Eliom_registration.File.register
(if_eligible can_read (if_eligible can_read
(fun uuid election user () -> (fun uuid election user () ->
let module X = (val election : Web_common.WEB_ELECTION) in let module X = (val election : Web_common.WEB_ELECTION) in
return X.data.Web_common.fn_public_keys return X.election_web.Web_common.fn_public_keys
) )
) )
...@@ -492,7 +492,7 @@ let do_cast election uuid () = ...@@ -492,7 +492,7 @@ let do_cast election uuid () =
let module X = (val election : WEB_ELECTION) in let module X = (val election : WEB_ELECTION) in
match_lwt Eliom_reference.get Services.user with match_lwt Eliom_reference.get Services.user with
| Some user as u -> | Some user as u ->
lwt b = check_acl can_vote X.data u in lwt b = check_acl can_vote X.election_web u in
if b then ( if b then (
let record = let record =
Web_common.string_of_user user, Web_common.string_of_user user,
...@@ -505,7 +505,7 @@ let do_cast election uuid () = ...@@ -505,7 +505,7 @@ let do_cast election uuid () =
with Error e -> return (`Error e) with Error e -> return (`Error e)
in in
Eliom_reference.unset Services.ballot >> Eliom_reference.unset Services.ballot >>
Templates.do_cast_ballot ~auth_systems ~election:X.data ~result Templates.do_cast_ballot ~auth_systems ~election:X.election_web ~result
) else forbidden () ) else forbidden ()
| None -> forbidden () | None -> forbidden ()
end end
...@@ -522,8 +522,8 @@ let ballot_received uuid election user = ...@@ -522,8 +522,8 @@ let ballot_received uuid election user =
(do_cast election) (do_cast election)
in service in service
in in
lwt can_vote = check_acl can_vote X.data user in lwt can_vote = check_acl can_vote X.election_web user in
Templates.ballot_received ~auth_systems ~election:X.data ~confirm ~user ~can_vote Templates.ballot_received ~auth_systems ~election:X.election_web ~confirm ~user ~can_vote
let () = Eliom_registration.Html5.register let () = Eliom_registration.Html5.register
......
...@@ -164,7 +164,7 @@ let make_button ~service contents = ...@@ -164,7 +164,7 @@ let make_button ~service contents =
let election_view ~auth_systems ~election ~user = let election_view ~auth_systems ~election ~user =
let module X = (val election : Web_common.WEB_ELECTION) in let module X = (val election : Web_common.WEB_ELECTION) in
let election = X.data in let election = X.election_web in
let service = Services.(preapply_uuid election_raw election) in let service = Services.(preapply_uuid election_raw election) in
lwt permissions = lwt permissions =
let open Web_common in let open Web_common in
...@@ -251,7 +251,7 @@ let election_view ~auth_systems ~election ~user = ...@@ -251,7 +251,7 @@ let election_view ~auth_systems ~election ~user =
let election_cast_raw ~election = let election_cast_raw ~election =
let module X = (val election : Web_common.WEB_ELECTION) in let module X = (val election : Web_common.WEB_ELECTION) in
let election = X.data in let election = X.election_web in
let form_rawballot = post_form ~service:Services.election_cast_post let form_rawballot = post_form ~service:Services.election_cast_post
(fun (name, _) -> (fun (name, _) ->
[ [
...@@ -345,7 +345,7 @@ let do_cast_ballot ~election ~result = ...@@ -345,7 +345,7 @@ let do_cast_ballot ~election ~result =
let election_update_credential ~election = let election_update_credential ~election =
let module X = (val election : Web_common.WEB_ELECTION) in let module X = (val election : Web_common.WEB_ELECTION) in
let election = X.data in let election = X.election_web in
let form = post_form ~service:Services.election_update_credential let form = post_form ~service:Services.election_update_credential
(fun (old, new_) -> (fun (old, new_) ->
[ [
......
...@@ -26,7 +26,7 @@ type acl = ...@@ -26,7 +26,7 @@ type acl =
module SSet = Set.Make(String) module SSet = Set.Make(String)
type election_data = { type election_web = {
fn_params : string; fn_params : string;
fingerprint : string; fingerprint : string;
params : ff_pubkey params; params : ff_pubkey params;
...@@ -301,5 +301,5 @@ module type WEB_ELECTION = sig ...@@ -301,5 +301,5 @@ module type WEB_ELECTION = sig
module P : Signatures.ELECTION_PARAMS module P : Signatures.ELECTION_PARAMS
module E : LWT_ELECTION module E : LWT_ELECTION
module B : WEB_BBOX module B : WEB_BBOX
val data : election_data val election_web : election_web
end end
...@@ -17,7 +17,7 @@ type acl = ...@@ -17,7 +17,7 @@ type acl =
module SSet : Set.S with type elt = string module SSet : Set.S with type elt = string
type election_data = { type election_web = {
fn_params : string; fn_params : string;
fingerprint : string; fingerprint : string;
params : ff_pubkey params; params : ff_pubkey params;
...@@ -80,7 +80,7 @@ module type WEB_ELECTION = sig ...@@ -80,7 +80,7 @@ module type WEB_ELECTION = sig
module P : Signatures.ELECTION_PARAMS module P : Signatures.ELECTION_PARAMS
module E : LWT_ELECTION module E : LWT_ELECTION
module B : WEB_BBOX module B : WEB_BBOX
val data : election_data val election_web : election_web
end end
val open_security_log : string -> unit Lwt.t val open_security_log : string -> unit 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