Right fix and translation

This commit is contained in:
Skia
2016-09-01 11:27:00 +02:00
parent a4c5d48159
commit f7e3251ae5
3 changed files with 13 additions and 6 deletions

View File

@ -461,6 +461,8 @@ class SithFile(models.Model):
verbose_name = _("file")
def is_owned_by(self, user):
if hasattr(self, 'profile_of') and user.is_in_group(settings.SITH_MAIN_BOARD_GROUP):
return True
return user.id == self.owner.id
def can_be_viewed_by(self, user):