summaryrefslogtreecommitdiff
path: root/db/dbeval.cpp
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-02-04 10:49:19 -0500
committerEliot Horowitz <eliot@10gen.com>2010-02-04 10:49:19 -0500
commit62f47cc910f68b842a512533bd06b5343f7da41e (patch)
treee8b61a4ddb43cec1bbdf32a76340a605e8a5ef7b /db/dbeval.cpp
parentcecffe079e564f81fae8d34839d08ab2c3bcb13d (diff)
downloadmongo-62f47cc910f68b842a512533bd06b5343f7da41e.tar.gz
cleaning up security - moving to centralized location
Diffstat (limited to 'db/dbeval.cpp')
-rw-r--r--db/dbeval.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/db/dbeval.cpp b/db/dbeval.cpp
index aa38974b6cb..af0c237c4fa 100644
--- a/db/dbeval.cpp
+++ b/db/dbeval.cpp
@@ -118,8 +118,8 @@ namespace mongo {
}
CmdEval() : Command("$eval") { }
bool run(const char *ns, BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool fromRepl) {
- AuthenticationInfo *ai = currentClient.get()->ai;
- uassert( 12598 , "$eval readOnly unauthorized", ai->isReadOnlyAuthorized(cc().database()->name.c_str()));
+ AuthenticationInfo *ai = cc().getAuthenticationInfo();
+ uassert( 12598 , "$eval readOnly unauthorized", ai->isAuthorizedReads(cc().database()->name.c_str()));
return dbEval(ns, cmdObj, result, errmsg);
}
} cmdeval;