diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2021-03-08 12:03:40 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-03-08 17:58:19 +0000 |
commit | 2a7183bad6b412fe97f464679b2a49eb46b47eec (patch) | |
tree | a0194e1f4f2be52980eda60290baf96f55f45d26 /src/mongo/db/auth | |
parent | dc009c5a8d484f6a0db2f357274e14e30ea9f476 (diff) | |
download | mongo-2a7183bad6b412fe97f464679b2a49eb46b47eec.tar.gz |
SERVER-54521 Extend access_check for simple and privileges
Diffstat (limited to 'src/mongo/db/auth')
-rw-r--r-- | src/mongo/db/auth/resource_pattern.h | 7 |
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. |