Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Video AG Infrastruktur
website
Commits
c7d95cab
Commit
c7d95cab
authored
May 28, 2017
by
Julian Rother
Browse files
Enable basic auth for ical export
parent
eefab03a
Changes
1
Hide whitespace changes
Inline
Side-by-side
icalexport.py
View file @
c7d95cab
...
...
@@ -35,11 +35,14 @@ def calperm(func):
for
net
in
config
[
'FSMPI_IP_RANGES'
]:
if
ip
in
ip_network
(
net
):
permission
=
True
if
request
.
authorization
:
userinfo
,
groups
=
ldapauth
(
request
.
authorization
.
username
,
request
.
authorization
.
password
)
if
check_mod
(
userinfo
.
get
(
'uid'
),
groups
):
permission
=
True
if
permission
:
return
func
(
*
args
,
**
kwargs
)
else
:
flash
(
'Diese Funktion ist nur aus dem FSMPI-Netz(für SOGO-Import) oder eingeloggt verfügbar!'
)
return
redirect
(
url_for
(
'index'
))
return
Response
(
"Login required"
,
401
,
{
'WWW-Authenticate'
:
'Basic realm="FS-Login required"'
})
return
decorator
@
app
.
route
(
'/internal/ical/all'
)
...
...
Write
Preview
Supports
Markdown
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