summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/apply_ops.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands/apply_ops.cpp')
-rw-r--r--src/mongo/db/commands/apply_ops.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/commands/apply_ops.cpp b/src/mongo/db/commands/apply_ops.cpp
index 48af61d3153..0b207c529f3 100644
--- a/src/mongo/db/commands/apply_ops.cpp
+++ b/src/mongo/db/commands/apply_ops.cpp
@@ -34,6 +34,7 @@
#include "mongo/db/auth/authorization_manager_global.h"
#include "mongo/db/auth/authorization_session.h"
#include "mongo/db/auth/privilege.h"
+#include "mongo/db/auth/resource_pattern.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/commands.h"
#include "mongo/db/instance.h"
@@ -54,7 +55,7 @@ namespace mongo {
const BSONObj& cmdObj,
std::vector<Privilege>* out) {
// applyOps can do pretty much anything, so require all privileges.
- out->push_back(Privilege(AuthorizationManager::WILDCARD_RESOURCE_NAME,
+ out->push_back(Privilege(ResourcePattern::forAnyResource(),
getGlobalAuthorizationManager()->getAllUserActions()));
}
virtual bool run(const string& dbname, BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool fromRepl) {