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
a75e9b72
Commit
a75e9b72
authored
Mar 22, 2014
by
Stephane Glondu
Browse files
Simplify some names
parent
30bd9fca
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/web/registration.ml
View file @
a75e9b72
...
...
@@ -141,10 +141,10 @@ let process_datadir dir =
return
(
SSet
.
add
c
accu
)
)
in
let
featured
_p
=
item
.
datadir_featured
in
let
election
=
Web_election
.
make
_web_election
let
featured
=
item
.
datadir_featured
in
let
election
=
Web_election
.
make
raw_election
metadata
~
featured
_p
~
featured
~
params_fname
~
public_keys_fname
in
...
...
@@ -172,7 +172,7 @@ let get_election_by_uuid x =
let
get_featured_elections
()
=
EMap
.
fold
(
fun
uuid
e
res
->
let
module
X
=
(
val
e
:
WEB_ELECTION
)
in
if
X
.
featured
_p
then
if
X
.
featured
then
e
::
res
else
res
)
election_table
[]
|>
return
...
...
src/web/web_election.ml
View file @
a75e9b72
...
...
@@ -44,7 +44,7 @@ let can_vote m user =
|
None
->
false
(* voters must log in *)
|
Some
u
->
check_acl
(
Some
acls
)
u
.
user_user
let
make
_web_election
raw_election
metadata
~
featured
_p
~
params_fname
~
public_keys_fname
=
let
make
raw_election
metadata
~
featured
~
params_fname
~
public_keys_fname
=
let
e_fingerprint
=
sha256_b64
raw_election
in
let
wrapped_params
=
Serializable_j
.
params_of_string
...
...
@@ -64,7 +64,7 @@ let make_web_election raw_election metadata ~featured_p ~params_fname ~public_ke
let
public_keys_fname
=
public_keys_fname
let
params_fname
=
params_fname
let
featured
_p
=
featured
_p
let
featured
=
featured
module
B
:
WEB_BALLOT_BOX
=
struct
...
...
src/web/web_election.mli
View file @
a75e9b72
...
...
@@ -24,10 +24,10 @@ open Serializable_t
open
Web_serializable_t
open
Web_signatures
val
make
_web_election
:
val
make
:
string
->
metadata
->
featured
_p
:
bool
->
featured
:
bool
->
params_fname
:
string
->
public_keys_fname
:
string
->
(
module
WEB_ELECTION
)
src/web/web_signatures.mli
View file @
a75e9b72
...
...
@@ -270,7 +270,7 @@ module type WEB_ELECTION = sig
val
election
:
G
.
t
election
val
metadata
:
metadata
val
featured
_p
:
bool
val
featured
:
bool
val
params_fname
:
string
val
public_keys_fname
:
string
...
...
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