diff options
author | Justin Seyster <justin.seyster@mongodb.com> | 2017-04-28 12:32:06 -0400 |
---|---|---|
committer | Justin Seyster <justin.seyster@mongodb.com> | 2017-04-28 12:32:06 -0400 |
commit | 4f1db7deaacfe76a2916c2c6b259191c491df2d4 (patch) | |
tree | 0c7c1ea993ae637b7675564fe72f266e33d7ff2a /src/mongo/db/auth/authorization_session.h | |
parent | 940481c8229b7925d661d3a9e693d70b1f9453f2 (diff) | |
download | mongo-4f1db7deaacfe76a2916c2c6b259191c491df2d4.tar.gz |
SERVER-26577 Fix permissions for listCollections getMore.
Squashed commit of the following:
commit 11c363b941e99fc288c4f9a19cb807442fb09d44
Author: Justin Seyster <justin.seyster@mongodb.com>
Date: Fri Apr 21 17:59:23 2017 -0400
SERVER-26577 JS test for listCollections_getMore authorization
commit fa3e01205995ad4fd139e3d4fe77c407c2409aa0
Author: Justin Seyster <justin.seyster@mongodb.com>
Date: Thu Apr 20 15:10:49 2017 -0400
SERVER-26577 Unit tests for isAuthorizedToListCollections
commit 53cea2802850f221b492e5469d8da659bd1f6694
Author: Justin Seyster <justin.seyster@mongodb.com>
Date: Wed Apr 19 17:16:51 2017 -0400
SERVER-26577 Permissions checks for listCollections go to one function
Diffstat (limited to 'src/mongo/db/auth/authorization_session.h')
-rw-r--r-- | src/mongo/db/auth/authorization_session.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/auth/authorization_session.h b/src/mongo/db/auth/authorization_session.h index 5d6089b3a9f..ab4c5dec27c 100644 --- a/src/mongo/db/auth/authorization_session.h +++ b/src/mongo/db/auth/authorization_session.h @@ -218,6 +218,10 @@ public: // is allowed to change his/her own password bool isAuthorizedToChangeOwnPasswordAsUser(const UserName& userName); + // Returns true if the current session is authorized to list the collections in the given + // database. + bool isAuthorizedToListCollections(StringData dbname); + // Returns true if the current session is authenticated as the given user and that user // is allowed to change his/her own customData. bool isAuthorizedToChangeOwnCustomDataAsUser(const UserName& userName); |