summaryrefslogtreecommitdiff
path: root/src/mongo/db/auth/privilege.h
diff options
context:
space:
mode:
authorSpencer T Brody <spencer@10gen.com>2013-05-07 19:51:11 -0400
committerSpencer T Brody <spencer@10gen.com>2013-05-22 14:08:54 -0400
commit0467aeb4416f82ff18927f3f887cd181073e1db6 (patch)
treece2f3704fec533241898d9d8571f428ae7b461fc /src/mongo/db/auth/privilege.h
parent59c64b943afa52b4d837949b1094be1d895bf062 (diff)
downloadmongo-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.h6
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