Skip to content
Snippets Groups Projects
Commit 87f5b9e3 authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

Apply 1 suggestion(s) to 1 file(s)

parent 5270d4d2
No related branches found
No related tags found
1 merge request!113Resolve "Review permissions"
Pipeline #6490 passed
......@@ -13,7 +13,7 @@ def has_timetable_perm(user: User, obj: Model) -> bool:
"""Predicate which checks whether the user is allowed to access the requested timetable."""
if type(obj) is Group:
return (
user.person.member_of.filter(id=obj.id).exists()
obj in user.person.member_of.all()
or user.person.primary_group == obj
or user.person.owner_of.filter(id=obj.id).exists()
or has_global_perm("chronos.view_all_group_timetables")(user)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment