diff options
author | Spencer T Brody <spencer@10gen.com> | 2013-05-07 19:51:11 -0400 |
---|---|---|
committer | Spencer T Brody <spencer@10gen.com> | 2013-05-22 14:08:54 -0400 |
commit | 0467aeb4416f82ff18927f3f887cd181073e1db6 (patch) | |
tree | ce2f3704fec533241898d9d8571f428ae7b461fc /src/mongo/db/auth/privilege.h | |
parent | 59c64b943afa52b4d837949b1094be1d895bf062 (diff) | |
download | mongo-0467aeb4416f82ff18927f3f887cd181073e1db6.tar.gz |
SERVER-9518 Initial implementation of RoleGraph data structures
Diffstat (limited to 'src/mongo/db/auth/privilege.h')
-rw-r--r-- | src/mongo/db/auth/privilege.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/auth/privilege.h b/src/mongo/db/auth/privilege.h index eef476ea224..0b113c7ff56 100644 --- a/src/mongo/db/auth/privilege.h +++ b/src/mongo/db/auth/privilege.h @@ -16,6 +16,7 @@ #pragma once #include <string> +#include <vector> #include "mongo/db/auth/action_set.h" #include "mongo/db/auth/action_type.h" @@ -37,6 +38,9 @@ namespace mongo { const ActionSet& getActions() const { return _actions; } + void addActions(const ActionSet& actionsToAdd); + void removeActions(const ActionSet& actionsToRemove); + // Checks if the given action is present in the Privilege. bool includesAction(const ActionType& action) const; // Checks if the given actions are present in the Privilege. @@ -48,4 +52,6 @@ namespace mongo { ActionSet _actions; // bitmask of actions this privilege grants }; + typedef std::vector<Privilege> PrivilegeVector; + } // namespace mongo |