summaryrefslogtreecommitdiff
path: root/src/mongo/db/auth
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/auth')
-rw-r--r--src/mongo/db/auth/resource_pattern.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/auth/resource_pattern.h b/src/mongo/db/auth/resource_pattern.h
index 6f51a768120..d82281d3625 100644
--- a/src/mongo/db/auth/resource_pattern.h
+++ b/src/mongo/db/auth/resource_pattern.h
@@ -189,6 +189,13 @@ public:
return H::combine(std::move(h), rp._ns, rp._matchType);
}
+ /**
+ * Returns a pattern for IDL generated code to use.
+ */
+ static ResourcePattern forAuthorizationContract(MatchTypeEnum e) {
+ return ResourcePattern(e);
+ }
+
private:
// AuthorizationContract works directly with MatchTypeEnum. Users should not be concerned with
// how a ResourcePattern was constructed.