Commit e22d9742 by Őry Máté

acl: fix get_objects_with_level

parent e3eb7f6c
...@@ -193,7 +193,7 @@ class AclBase(Model): ...@@ -193,7 +193,7 @@ class AclBase(Model):
levelfilter = Q(users=user) levelfilter = Q(users=user)
if group_also: if group_also:
levelfilter |= Q(groups__in=user.groups.all()) levelfilter |= Q(groups__in=user.groups.all())
ols = user.objectlevel_set.filter( ols = ObjectLevel.objects.filter(
levelfilter, levelfilter,
content_type=ct, level__weight__gte=level.weight).distinct() content_type=ct, level__weight__gte=level.weight).distinct()
clsfilter = Q(object_level_set__in=ols.all()) clsfilter = Q(object_level_set__in=ols.all())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment