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
f45e693a
Commit
f45e693a
authored
Oct 08, 2016
by
Julian Rother
Browse files
Added l2p and rwth-intern auth checks
parent
86d71023
Changes
2
Hide whitespace changes
Inline
Side-by-side
db_schema.sql
View file @
f45e693a
...
...
@@ -112,6 +112,7 @@ CREATE TABLE IF NOT EXISTS `auth_data` (
`lecture_id`
INTEGER
,
`video_id`
INTEGER
,
`auth_type`
varchar
(
10
),
`auth_param`
varchar
(
127
),
`auth_user`
varchar
(
127
),
`auth_passwd`
varchar
(
127
),
`time_created`
datetime
NOT
NULL
,
...
...
server.py
View file @
f45e693a
...
...
@@ -388,6 +388,14 @@ def auth(): # For use with nginx auth_request
if
auth
and
video
[
'auth_user'
]
==
auth
.
username
and
video
[
'auth_passwd'
]
==
auth
.
password
:
allowed
=
True
break
elif
video
[
'auth_type'
]
==
'l2p'
:
if
video
[
'auth_param'
]
in
session
.
get
(
'l2p_courses'
,
[]):
allowed
=
True
break
elif
video
[
'auth_type'
]
==
'rwth'
:
if
session
.
get
(
'rwthintern'
,
False
):
allowed
=
True
break
if
not
types
[
0
]
or
allowed
or
ismod
()
or
\
(
auth
and
check_mod
(
*
ldapauth
(
auth
.
username
,
auth
.
password
))):
return
'OK'
,
200
...
...
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