0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 00:56:44 +01:00

have read/write lock on all platforms/boost now

This commit is contained in:
Eliot Horowitz 2010-06-29 22:17:15 -04:00
parent 629a3d6115
commit 35031d43d7
3 changed files with 1 additions and 12 deletions

View File

@ -34,10 +34,6 @@
namespace mongo {
inline bool readLockSupported(){
return true;
}
string sayClientState();
bool haveClient();

View File

@ -128,7 +128,6 @@ namespace mongo {
virtual bool readOnly(){ return true; }
virtual LockType locktype() const { return READ; }
virtual bool run(const string& ns, BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool fromRepl){
result.append( "readlock" , readLockSupported() );
if ( globalScriptEngine ){
BSONObjBuilder bb( result.subobjStart( "js" ) );
result.append( "utf8" , globalScriptEngine->utf8Ok() );

View File

@ -174,13 +174,7 @@ namespace mongo {
AuthenticationInfo *ai = cc().getAuthenticationInfo();
if ( userObj[ "readOnly" ].isBoolean() && userObj[ "readOnly" ].boolean() ) {
if ( readLockSupported() ){
ai->authorizeReadOnly( cc().database()->name.c_str() );
}
else {
log() << "warning: old version of boost, read-only users not supported" << endl;
ai->authorize( cc().database()->name.c_str() );
}
ai->authorizeReadOnly( cc().database()->name.c_str() );
} else {
ai->authorize( cc().database()->name.c_str() );
}