diff options
author | Spencer T Brody <spencer@10gen.com> | 2013-10-08 16:26:48 -0400 |
---|---|---|
committer | Spencer T Brody <spencer@10gen.com> | 2013-10-10 11:52:06 -0400 |
commit | 586c2dea5a72bfc2917af91d0751fcd399c0209b (patch) | |
tree | 2bff22a9922a3434df5271317a9ef93c7e5e81e6 /src/mongo/db/auth/user.h | |
parent | bbf4667c8c437d6db93b9c3ec711e40d49349b45 (diff) | |
download | mongo-586c2dea5a72bfc2917af91d0751fcd399c0209b.tar.gz |
SERVER-6246 SERVER-9515 Implement proper authz checks for user and role management commands
Diffstat (limited to 'src/mongo/db/auth/user.h')
-rw-r--r-- | src/mongo/db/auth/user.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/auth/user.h b/src/mongo/db/auth/user.h index 698583885bf..053e045fe1e 100644 --- a/src/mongo/db/auth/user.h +++ b/src/mongo/db/auth/user.h @@ -76,6 +76,11 @@ namespace mongo { const RoleDataMap& getRoles() const; /** + * Returns true if this user is a member of the given role. + */ + bool hasRole(const RoleName& roleName) const; + + /** * Returns a reference to the information about the user's privileges. */ const ResourcePrivilegeMap& getPrivileges() const { return _privileges; } |