diff --git a/pandora/item/models.py b/pandora/item/models.py index 22f35927..2a927120 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -233,9 +233,8 @@ class Item(models.Model): def editable(self, user): if user.is_anonymous: return False - level = user.profile.get_level() - allowed_level = settings.CONFIG['capabilities']['canSeeItem'][level] - if self.level > allowed_level: + max_level = len(settings.CONFIG['rightsLevels']) + if self.level > max_level: return False if user.profile.capability('canEditMetadata') or \ user.is_staff or \