fix level check

This commit is contained in:
j 2023-02-21 18:26:43 +01:00
parent 97c8cf67b9
commit a3880f3b38

View file

@ -328,7 +328,7 @@ class Document(models.Model, FulltextMixin):
if not user or user.is_anonymous:
return False
max_level = len(settings.CONFIG['rightsLevels'])
if self.level > max_level:
if self.rightslevel > max_level:
return False
if self.user == user or \
self.groups.filter(id__in=user.groups.all()).count() > 0 or \