Skip to content
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

Add user commands to handler map #3918

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions internal/handler/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@
Handler: h.MsgCreateIndexes,
Help: "Creates indexes on a collection.",
},
"createUser": {
Handler: h.MsgCreateUser,
Help: "Creates a new user on the database where you run the command.",
},

Check warning on line 83 in internal/handler/commands.go

View check run for this annotation

Codecov / codecov/patch

internal/handler/commands.go#L80-L83

Added lines #L80 - L83 were not covered by tests
Comment on lines +80 to +83
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those commands are listed down below inside of EnablenewAuth if, so I assume they should be only accessible when running FerretDB with -test-enable-new-auth, i can be wrong though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct indeed!

"currentOp": {
Handler: h.MsgCurrentOp,
Help: "Returns information about operations currently in progress.",
Expand Down Expand Up @@ -109,6 +113,14 @@
Handler: h.MsgDrop,
Help: "Drops the collection.",
},
"dropAllUsersFromDatabase": {
Handler: h.MsgDropAllUsersFromDatabase,
Help: "Removes all users from the database on which you run the command.",
},
"dropUser": {
Handler: h.MsgDropUser,
Help: "Removes the user from the database on which you run the command.",
},

Check warning on line 123 in internal/handler/commands.go

View check run for this annotation

Codecov / codecov/patch

internal/handler/commands.go#L116-L123

Added lines #L116 - L123 were not covered by tests
"dropDatabase": {
Handler: h.MsgDropDatabase,
Help: "Drops production database.",
Expand Down
Loading