user.get_profile()->user.profile

This commit is contained in:
j 2016-02-19 22:04:15 +05:30
commit 1cc795995d
27 changed files with 72 additions and 70 deletions

View file

@ -103,7 +103,7 @@ class Document(models.Model):
return False
if self.user == user or \
user.is_staff or \
user.get_profile().capability('canEditDocuments') == True or \
user.profile.capability('canEditDocuments') == True or \
(item and item.editable(user)):
return True
return False