-
Notifications
You must be signed in to change notification settings - Fork 67
SWIFT-773: add authorizedDatabases optional option #450
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
Conversation
|
just occurred to me, you'll need to make these same API changes to support |
kmahar
left a comment
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
| * - `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 "
CommandErrorif ...". format. so something like "if options.authorizedDatabases is false and the user does not have listDatabases permissions." -
listDatabase -> listDatabases
kmahar
left a comment
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
authorizedDatabasesoption to ListDatabasesOperation as an optional param. No changes needed to the helpers.Check out the flag docs here