forked from 0x2620/pandora
fix group access to info page
This commit is contained in:
parent
73ee17d1e5
commit
41b979b061
2 changed files with 3 additions and 7 deletions
|
|
@ -197,11 +197,7 @@ class Item(models.Model):
|
|||
allowed_level = settings.CONFIG['capabilities']['canSeeItem'][level]
|
||||
if self.level <= allowed_level:
|
||||
return True
|
||||
elif user.is_authenticated() and \
|
||||
(self.user == user or \
|
||||
self.groups.filter(id__in=user.groups.all()).count() > 0):
|
||||
return True
|
||||
return False
|
||||
return self.editable(user)
|
||||
|
||||
def editable(self, user):
|
||||
if user.is_anonymous():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue