fix level check
This commit is contained in:
parent
97c8cf67b9
commit
a3880f3b38
1 changed files with 1 additions and 1 deletions
|
@ -328,7 +328,7 @@ class Document(models.Model, FulltextMixin):
|
||||||
if not user or user.is_anonymous:
|
if not user or user.is_anonymous:
|
||||||
return False
|
return False
|
||||||
max_level = len(settings.CONFIG['rightsLevels'])
|
max_level = len(settings.CONFIG['rightsLevels'])
|
||||||
if self.level > max_level:
|
if self.rightslevel > max_level:
|
||||||
return False
|
return False
|
||||||
if self.user == user or \
|
if self.user == user or \
|
||||||
self.groups.filter(id__in=user.groups.all()).count() > 0 or \
|
self.groups.filter(id__in=user.groups.all()).count() > 0 or \
|
||||||
|
|
Loading…
Reference in a new issue