From a3880f3b386c5bc44c0c9ceddc99815633004682 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 21 Feb 2023 18:26:43 +0100 Subject: [PATCH] fix level check --- pandora/document/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/document/models.py b/pandora/document/models.py index df5b8cb6..d76cac36 100644 --- a/pandora/document/models.py +++ b/pandora/document/models.py @@ -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 \