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

Corrected fix of auth permission query (#218)

parent ab01b517
......@@ -522,9 +522,9 @@ def auth(): # For use with nginx auth_request
FROM videos
JOIN lectures ON (videos.lecture_id = lectures.id)
JOIN courses ON (lectures.course_id = courses.id)
LEFT JOIN perm ON (videos.id = perm.video_id OR lectures.id = perm.lecture_id OR courses.id = perm.course_id)
LEFT JOIN perm ON ((videos.id = perm.video_id OR lectures.id = perm.lecture_id OR courses.id = perm.course_id) AND NOT perm.deleted)
WHERE videos.path = ?
AND (courses.visible AND lectures.visible AND videos.visible AND NOT perm.deleted)
AND (courses.visible AND lectures.visible AND videos.visible)
ORDER BY perm.video_id DESC, perm.lecture_id DESC, perm.course_id DESC''',
url)
if not perms:
......
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