You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -73,7 +73,7 @@ export class ConnectClusterTool extends AtlasToolBase {
73
73
constpassword=awaitgenerateSecurePassword();
74
74
75
75
constexpiryDate=newDate(Date.now()+EXPIRY_MS);
76
-
constrole=this.getRoleFromConfig();
76
+
constrole=getDefaultRoleFromConfig(this.config);
77
77
78
78
awaitthis.session.apiClient.createDatabaseUser({
79
79
params: {
@@ -245,35 +245,4 @@ export class ConnectClusterTool extends AtlasToolBase {
245
245
],
246
246
};
247
247
}
248
-
249
-
/**
250
-
* @description Get the role name for the database user based on the Atlas Admin API https://www.mongodb.com/docs/atlas/mongodb-users-roles-and-privileges/
251
-
* @returns The role name for the database user
252
-
*/
253
-
privategetRoleFromConfig(): DatabaseUserRole{
254
-
if(this.config.readOnly){
255
-
return{
256
-
roleName: "readAnyDatabase",
257
-
databaseName: "admin",
258
-
};
259
-
}
260
-
261
-
// If all write tools are enabled, use readWriteAnyDatabase
0 commit comments