Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
belenios
belenios
Commits
26cb5ecc
Commit
26cb5ecc
authored
Feb 12, 2016
by
Stephane Glondu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When on election_admin and not logged in, redirect to login page
parent
a4337616
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
src/web/web_site.ml
src/web/web_site.ml
+7
-3
No files found.
src/web/web_site.ml
View file @
26cb5ecc
...
...
@@ -998,12 +998,16 @@ let () =
lwt
w
=
find_election
uuid_s
in
lwt
site_user
=
Web_auth_state
.
get_site_user
()
in
let
module
W
=
(
val
w
)
in
let
uuid
=
Uuidm
.
to_string
W
.
election
.
e_params
.
e_uuid
in
match
site_user
with
|
Some
u
when
W
.
metadata
.
e_owner
=
Some
u
->
lwt
state
=
Web_persist
.
get_election_state
uuid
in
lwt
state
=
Web_persist
.
get_election_state
uuid
_s
in
T
.
election_admin
(
module
W
)
state
()
>>=
Html5
.
send
|
_
->
forbidden
()
|
_
->
let
cont
()
=
Redirection
.
send
(
Eliom_service
.
preapply
election_admin
(
uuid
,
()
))
in
Eliom_reference
.
set
Web_auth_state
.
cont
[
cont
]
>>
Redirection
.
send
(
Eliom_service
.
preapply
site_login
None
)
)
let
election_set_state
state
(
uuid
,
()
)
()
=
...
...
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