diff --git a/lib/authn.js b/lib/authn.js index 3062f08..0bb4a89 100644 --- a/lib/authn.js +++ b/lib/authn.js @@ -35,13 +35,6 @@ export async function openDatabase(options) { const serverInfo = await admin.serverInfo(null); _checkServerVersion({serverInfo, config}); - // check if server supports roles; if not, can't authenticate - if(!_usesRoles(serverInfo)) { - const stringVersion = serverInfo.versionArray.join('.'); - throw new BedrockError( - `MongoDB server version "${stringVersion}" is unsupported.`, - 'NotSupportedError'); - } // makes an unauthenticated call to the server // to see if auth is required const authRequired = await _isAuthnRequired({config, admin}); @@ -88,13 +81,6 @@ async function _connect(options) { return {client, db}; } -function _usesRoles(serverInfo) { - // >= Mongo 2.6 uses user roles - return ( - (serverInfo.versionArray[0] == 2 && serverInfo.versionArray[1] >= 6) || - (serverInfo.versionArray[0] > 2)); -} - /** * Determines if authn is required. *