def has_edit_permission(user, organization):
    """Checks whether given user has permission to edit given object.
    """
    # Returns True if allowed to edit, False if not allowed to edit
    if user in organization.editors.all():
        return True
    else:
        return False