not editable if rightslevel is > allowed level
This commit is contained in:
parent
ffc2504c0f
commit
a80af18400
1 changed files with 4 additions and 0 deletions
|
@ -233,6 +233,10 @@ 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:
|
||||
return False
|
||||
if user.profile.capability('canEditMetadata') or \
|
||||
user.is_staff or \
|
||||
self.user == user or \
|
||||
|
|
Loading…
Reference in a new issue