Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
belenios
belenios
Commits
d2858f07
Commit
d2858f07
authored
Mar 18, 2015
by
Stephane Glondu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop forward references that are unneeded now
parent
2b70d058
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
15 deletions
+2
-15
src/web/web_site.ml
src/web/web_site.ml
+2
-15
No files found.
src/web/web_site.ml
View file @
d2858f07
...
...
@@ -74,21 +74,8 @@ let election_credtokens = Ocsipersist.open_table "site_credtokens"
(* In-memory table, indexed by UUID, contains closures. *)
let
election_table
=
ref
SMap
.
empty
(* The following reference is there to cut a dependency loop:
S.register_election depends on S (via Templates). It will be set
to a proper value once we have called Templates.Make. *)
let
import_election_ref
=
ref
(
fun
_
->
assert
false
)
(* Forward reference *)
let
install_authentication_ref
=
ref
(
fun
_
->
assert
false
)
include
Web_site_auth
let
import_election
f
=
!
import_election_ref
f
let
install_authentication
xs
=
!
install_authentication_ref
xs
module
T
=
Web_templates
let
register_election
params
web_params
=
...
...
@@ -120,7 +107,7 @@ let register_election params web_params =
(* Mutex to avoid simultaneous registrations of the same election *)
let
registration_mutex
=
Lwt_mutex
.
create
()
let
()
=
import_election
_ref
:=
fun
f
->
let
import_election
f
=
Lwt_mutex
.
lock
registration_mutex
>>
try_lwt
lwt
raw_election
=
...
...
@@ -244,7 +231,7 @@ module L = struct
let
logout
=
Eliom_service
.
preapply
site_logout
()
end
let
()
=
install_authentication
_ref
:=
fun
auth_configs
->
let
install_authentication
auth_configs
=
let
module
T
=
T
.
Login
(
Web_site_auth
)
(
L
)
in
let
templates
=
(
module
T
:
LOGIN_TEMPLATES
)
in
Web_site_auth
.
register
templates
auth_configs
...
...
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