def vet_perms(user, observation):
    """
    This context flag will determine if vet buttons appears for the observation.
    That includes observer, station owner involved, moderators, admins.
    see: https://wiki.satnogs.org/Operation#Network_permissions_matrix
    """
    if user.is_authenticated():
        if user.ground_stations.filter(status=2).exists():
            return True
        try:
            if observation.author == user:
                return True
        except AttributeError:
            pass
        try:
            if observation.ground_station.owner == user:
                return True
        except AttributeError:
            pass
        if user.groups.filter(name='Moderators').exists():
            return True
        if user.is_superuser:
            return True
    return False
