Skip to content

Commit 11c2e69

Browse files
committed
feat(NODE-4795): deprecate addUser helper
1 parent 4b3e32d commit 11c2e69

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/admin.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ export class Admin {
106106
* @param username - The username for the new user
107107
* @param passwordOrOptions - An optional password for the new user, or the options for the command
108108
* @param options - Optional settings for the command
109+
* @deprecated Use the createUser command directly instead.
109110
*/
110111
async addUser(
111112
username: string,

src/operations/add_user.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ import { Callback, emitWarningOnce, getTopology } from '../utils';
99
import { CommandOperation, CommandOperationOptions } from './command';
1010
import { Aspect, defineAspects } from './operation';
1111

12-
/** @public */
12+
/**
13+
* @public
14+
* @deprecated Use the createUser command directly instead.
15+
*/
1316
export interface RoleSpecification {
1417
/**
1518
* A role grants privileges to perform sets of actions on defined resources.
@@ -20,7 +23,10 @@ export interface RoleSpecification {
2023
db: string;
2124
}
2225

23-
/** @public */
26+
/**
27+
* @public
28+
* @deprecated Use the createUser command directly instead.
29+
*/
2430
export interface AddUserOptions extends CommandOperationOptions {
2531
/** Roles associated with the created user */
2632
roles?: string | string[] | RoleSpecification | RoleSpecification[];

0 commit comments

Comments
 (0)