Commit 30b5034c authored by Florent Chehab's avatar Florent Chehab
Browse files

Fixes #54

Make use of optimization trick for is_member
parent 6d7d3f44
Pipeline #36188 passed with stages
in 4 minutes and 23 seconds
......@@ -7,4 +7,7 @@ def is_member(group_name: str, user: User) -> bool:
TODO unit test
return user.groups.filter(name=group_name).exists()
return group_name in user.cached_groups
# before:
# When we were using the standard django model
# return user.groups.filter(name=group_name).exists()
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