Use the new group accessor for the user groups.

This commit is contained in:
Roberto Rosario
2016-05-25 02:50:39 -04:00
parent 5e7a62e022
commit ab83e23f27

View File

@@ -56,7 +56,7 @@ class StoredPermission(models.Model):
return True
# Request is one of the permission's holders?
for group in user.groups.all():
for group in user.organization_groups.all():
for role in group.roles.all():
if self in role.permissions.all():
return True