Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
belenios
belenios
Commits
08588459
Commit
08588459
authored
Mar 19, 2015
by
Stephane Glondu
Browse files
Move string_of_user to Web_common
parent
9807c176
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/web/web_auth.ml
View file @
08588459
...
...
@@ -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
=
...
...
src/web/web_auth.mli
View file @
08588459
...
...
@@ -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
...
...
src/web/web_common.ml
View file @
08588459
...
...
@@ -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
src/web/web_common.mli
View file @
08588459
...
...
@@ -104,3 +104,5 @@ type setup_election = {
}
val
generate_token
:
unit
->
string
Lwt
.
t
val
string_of_user
:
user
->
string
src/web/web_election.ml
View file @
08588459
...
...
@@ -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
...
...
src/web/web_templates.ml
View file @
08588459
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment