0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00

SERVER-17669 Remove web auth prompt for non-auth mongod

This commit is contained in:
Andreas Nilsson 2015-03-20 10:43:56 -04:00
parent e7497e9c47
commit 2aeb5a17b1

View File

@ -110,6 +110,10 @@ namespace mongo {
vector<string>& headers,
const SockAddr &from) {
if ( !cc().getAuthorizationSession()->getAuthorizationManager().isAuthEnabled() ) {
return true;
}
if ( from.isLocalHost() && !_webUsers->haveAdminUsers(txn) ) {
cc().getAuthorizationSession()->grantInternalAuthorization();
return true;