-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SWIFT-773: add authorizedDatabases optional option #450
Conversation
just occurred to me, you'll need to make these same API changes to support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good 👍 just a few more nits
Sources/MongoSwift/MongoClient.swift
Outdated
@@ -352,14 +353,17 @@ public class MongoClient { | |||
* - `LogicError` if the provided session is inactive. | |||
* - `LogicError` if this client has already been closed. | |||
* - `EncodingError` if an error is encountered while encoding the options to BSON. | |||
* - `CommandError` when options.authorizedDatabases is false: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry to be pedantic...
-
can we phrase this more similarly to the previous bullet points? by that I mean the "
CommandError
if ...". format. so something like "if options.authorizedDatabases is false and the user does not have listDatabases permissions." -
listDatabase -> listDatabases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Added the
authorizedDatabases
option to ListDatabasesOperation as an optional param. No changes needed to the helpers.Check out the flag docs here