check for canEditFeaturedLists permission editing lists, fixes #377
This commit is contained in:
parent
525fab0400
commit
e0dc7b48e9
2 changed files with 9 additions and 2 deletions
|
|
@ -91,8 +91,11 @@ class List(models.Model):
|
|||
return self.user == user or self.status in ('public', 'featured')
|
||||
|
||||
def editable(self, user):
|
||||
#FIXME: make permissions work
|
||||
if self.user == user or user.is_staff:
|
||||
if user.is_anonymous():
|
||||
return False
|
||||
if self.user == user or \
|
||||
user.is_staff or \
|
||||
user.get_profile().capability('canEditFeaturedLists') == True:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue