Skip to content
Snippets Groups Projects
Commit f88817ba authored by Jonathan Weth's avatar Jonathan Weth :keyboard: Committed by Hangzhi Yu
Browse files

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

parent 01b96b63
No related branches found
No related tags found
2 merge requests!4Resolve "Add permissions/rules",!2Frontend
......@@ -17,7 +17,7 @@ def is_effort_group_member(user: User, obj: Effort):
linked to the effort.
"""
if obj:
return user.person in list(obj.group.members.all())
return user.person in obj.group.members.all()
return False
......@@ -29,7 +29,7 @@ def is_effort_group_owner(user: User, obj: Effort):
(or its respective parent groups) linked to the effort.
"""
if obj:
return user.person in list(obj.group.owners.all()) or obj.group.parent_groups.filter(owners=user.person).exists()
return user.person in obj.group.owners.all() or obj.group.parent_groups.filter(owners=user.person).exists()
return False
......
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