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

Move string_of_user to Web_common

parent 9807c176
......@@ -27,9 +27,6 @@ open Web_serializable_t
open Web_signatures
open Web_common
let string_of_user {user_domain; user_name} =
user_domain ^ ":" ^ user_name
let auth_systems = Hashtbl.create 10
let register_auth_system auth_system =
......
......@@ -24,8 +24,6 @@ open Signatures
open Web_serializable_t
open Web_signatures
val string_of_user : user -> string
val register_auth_system : (module AUTH_SYSTEM) -> unit
module Make (C : NAME) : sig
......
......@@ -242,3 +242,6 @@ let generate_token () =
loop (i+1)
) else return res
in loop 0
let string_of_user {user_domain; user_name} =
user_domain ^ ":" ^ user_name
......@@ -104,3 +104,5 @@ type setup_election = {
}
val generate_token : unit -> string Lwt.t
val string_of_user : user -> string
......@@ -423,7 +423,7 @@ module Make (D : ELECTION_DATA) (P : WEB_PARAMS) : REGISTRABLE = struct
| Some u ->
let b = check_acl W.metadata.e_voters u in
if b then (
let record = Web_auth.string_of_user u, now () in
let record = string_of_user u, now () in
lwt result =
try_lwt
lwt hash = W.B.cast the_ballot record in
......
......@@ -36,7 +36,7 @@ let welcome_message = "Welcome!"
let admin_background = " background: #FF9999;"
let format_user u =
em [pcdata (Web_auth.(string_of_user u))]
em [pcdata (string_of_user u)]
let make_login_box style auth links =
let style = "float: right; text-align: right;" ^ style 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