forked from 0x2620/pandora
fix query for documents rightslevel
This commit is contained in:
parent
35c26f095f
commit
6fd8d2aef3
1 changed files with 5 additions and 0 deletions
|
@ -75,6 +75,11 @@ def buildCondition(k, op, v, user, exclude=False, owner=None):
|
||||||
if exclude:
|
if exclude:
|
||||||
q = ~Q(id__in=models.Document.objects.filter(q))
|
q = ~Q(id__in=models.Document.objects.filter(q))
|
||||||
return q
|
return q
|
||||||
|
elif k == 'rightslevel':
|
||||||
|
q = Q(rightslevel=v)
|
||||||
|
if exclude:
|
||||||
|
q = ~Q(rightslevel=v)
|
||||||
|
return q
|
||||||
elif k == 'groups':
|
elif k == 'groups':
|
||||||
if op == '==' and v == '$my':
|
if op == '==' and v == '$my':
|
||||||
if not owner:
|
if not owner:
|
||||||
|
|
Loading…
Reference in a new issue