summaryrefslogtreecommitdiff
path: root/src/mongo/db/auth/action_set.cpp
diff options
context:
space:
mode:
authorSpencer T Brody <spencer@10gen.com>2012-11-01 15:35:11 -0400
committerSpencer T Brody <spencer@10gen.com>2012-11-05 17:36:27 -0500
commitf2104328d07610e8512e933d52a7af716e03b5dc (patch)
tree8e8e881ab4ccc3b25145af32a910c573ec41ad63 /src/mongo/db/auth/action_set.cpp
parentdf0c97f16fa234014565b5ce0c2f6a4388d18d9f (diff)
downloadmongo-f2104328d07610e8512e933d52a7af716e03b5dc.tar.gz
Ennumerate all actions in ActionType, and use ActionSet for roles. SERVER-7126
Diffstat (limited to 'src/mongo/db/auth/action_set.cpp')
-rw-r--r--src/mongo/db/auth/action_set.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/auth/action_set.cpp b/src/mongo/db/auth/action_set.cpp
index 7c37cb258d5..e8580190cf6 100644
--- a/src/mongo/db/auth/action_set.cpp
+++ b/src/mongo/db/auth/action_set.cpp
@@ -32,6 +32,14 @@ namespace mongo {
_actions.set(action.getIdentifier(), true);
}
+ void ActionSet::addAllActionsFromSet(const ActionSet& actions) {
+ _actions |= actions._actions;
+ }
+
+ void ActionSet::addAllActions() {
+ _actions = ~std::bitset<ActionType::NUM_ACTION_TYPES>();
+ }
+
bool ActionSet::contains(const ActionType& action) const {
return _actions[action.getIdentifier()];
}