diff options
Diffstat (limited to 'src/mongo/db/auth/action_set.cpp')
-rw-r--r-- | src/mongo/db/auth/action_set.cpp | 8 |
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()]; } |