Commit d7d9bb74 authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Move auth_config to metadata

parent c04f3060
......@@ -153,6 +153,7 @@ let empty_metadata = {
e_readers = None;
e_voters = None;
e_owner = None;
e_auth_config = None;
}
let check_acl a u =
......
......@@ -67,7 +67,11 @@ let make config =
module N = struct
let name = uuid
let path = base_path
let auth_config = config.auth_config
let auth_config =
match config.metadata.e_auth_config with
| None -> []
| Some xs -> xs
end
module Auth = Web_auth.Make (N)
......
......@@ -135,7 +135,6 @@ let parse_election_dir dir =
featured = item.datadir_featured;
params_fname;
public_keys_fname;
auth_config = !auth_instances;
}, public_creds_fname)
) index
......
......@@ -47,12 +47,19 @@ type acl =
| Many of acl_item list
]
type auth_config = {
auth_system : string;
auth_instance : string;
auth_config : (string * string) list;
}
type metadata = {
?voting_starts_at : datetime option;
?voting_ends_at : datetime option;
?readers : acl option;
?voters : acl option;
?owner: user option;
?auth_config: auth_config list option;
} <ocaml field_prefix="e_">
type datadir_item = {
......
......@@ -24,19 +24,12 @@ open Serializable_t
open Web_serializable_t
open Signatures
type auth_config = {
auth_system : string;
auth_instance : string;
auth_config : (string * string) list;
}
type election_config = {
raw_election : string;
metadata : metadata;
featured : bool;
params_fname : string;
public_keys_fname : string;
auth_config : auth_config list;
}
module type AUTH_SERVICES = sig
......
......@@ -19,6 +19,7 @@
(* <http://www.gnu.org/licenses/>. *)
(**************************************************************************)
open Web_serializable_t
open Web_signatures
module type CONFIG = sig
......
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