def METHOD_NAME(
    user: User,
    entity: Entity = None,
    entity_id: str = None,
) -> bool:
    return (user and user.owner) or \
        (not REQUIRE_USER_AUTHENTICATION and not is_test()) or \
        (user and user.get_access(entity, entity_id) & Permission.Access.OWNER != 0)