'Check if profile is an author or developer of the obj this thread
refers to, commonly used for permissions.'

def check_obj_author(self, profile):

    if (self.obj.__class__ == Webapp):
        return AddonUser.objects.filter(addon_id=self.obj.id, user=profile).exists()
    elif (self.obj.__class__ == Extension):
        return profile.extension_set.filter(id=self.obj.id).exists()
