Commit ee1e2382 authored by Julian Rother's avatar Julian Rother
Browse files

Consider basic auth params for player error messages

parent 0344f4d4
......@@ -450,7 +450,11 @@ def lecture(id, course=None, courseid=None):
if not courses:
return render_endpoint('courses', 'Diese Veranstaltung existiert nicht!'), 404
chapters = query('SELECT * FROM chapters WHERE lecture_id = ? AND NOT deleted AND (? OR visible) ORDER BY time ASC', id, ismod())
if not checkperm(perms):
username = password = None
if request.authorization:
username = request.authorization.username
password = request.authorization.password
if not checkperm(perms, username=username, password=password):
mode, text = permdescr(perms)
if mode == 'rwth':
flash(text+'. <a target="_blank" class="reloadonclose" href="'+url_for('start_rwthauth')+'">Hier authorisieren</a>.', category='player')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment