[CXX-1985] Support for 'authorizedDatabases' option Created: 10/Apr/20  Updated: 28/Oct/23  Resolved: 12/Nov/20

Status: Closed
Project: C++ Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 3.7.0, 3.7.0-beta1

Type: Improvement Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by DRIVERS-685 Support for 'authorizedDatabases' option Implementing
Related
is related to CXX-1433 Implement Database Enumeration spec Closed

 Description   

DRIVERS Ticket Description
Script Target - If you can read this text, the script has failed


 Comments   
Comment by Githook User [ 12/Nov/20 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CXX-1985 Rename filter to opts for list_databases (#745)
Branch: master
https://github.com/mongodb/mongo-cxx-driver/commit/b0f3fc7e94b5c1418d6037cff6a99b80cf5dccbc

Comment by Kevin Albertson [ 09/Nov/20 ]

PR: https://github.com/mongodb/mongo-cxx-driver/pull/745

Comment by Kevin Albertson [ 22/Sep/20 ]

The existing client::list_databases accepts a filter, but treats it in an odd way. This was introduced in CXX-1433.

 cursor list_databases(const bsoncxx::document::view_or_value filter) const;

However, the filter here is appended to the listDatabases command directly. To pass a filter, filter would really need to be the document with the key "filter":

{ "filter": { "name": "admin" } }

So, technically, users can already pass the "authorizedDatabases" option through the filter argument. For that overload. But it is misnamed, and I think we should rename filter to document_opts or similar, and possibly deprecate it.

list_database_names however, interprets its filter argument as a document filter.

Generated at Wed Feb 07 22:04:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.