def key_has_granted_prefix(key, prefixes):
    """
    Check that the requested s3 key starts with
    one of the granted file prefixes
    """
    granted = False
    for prefix in prefixes:
        if key.startswith(prefix):
            granted = True

    return granted