diff options
author | Andy Schwerin <schwerin@10gen.com> | 2013-10-05 19:42:01 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@10gen.com> | 2013-10-06 14:07:09 -0400 |
commit | 6e59b0de50d518bba9addb89b80c9160e438a3b2 (patch) | |
tree | b464da12bc8e4198e317f224ac59262398d54116 /src/mongo/db/auth/role_graph.h | |
parent | 11be81456ec4c24aa19cdf475fe9e7e79abe2066 (diff) | |
download | mongo-6e59b0de50d518bba9addb89b80c9160e438a3b2.tar.gz |
SERVER-10670 Make addRoleFromDocument and handleLogOp members of RoleGraph.
Diffstat (limited to 'src/mongo/db/auth/role_graph.h')
-rw-r--r-- | src/mongo/db/auth/role_graph.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mongo/db/auth/role_graph.h b/src/mongo/db/auth/role_graph.h index 1be802ce79d..602f791fa10 100644 --- a/src/mongo/db/auth/role_graph.h +++ b/src/mongo/db/auth/role_graph.h @@ -34,11 +34,14 @@ #include "mongo/base/status.h" #include "mongo/db/auth/privilege.h" #include "mongo/db/auth/role_name.h" +#include "mongo/db/namespace_string.h" #include "mongo/platform/unordered_map.h" #include "mongo/platform/unordered_set.h" namespace mongo { + class BSONOBj; + /** * A graph of role and privilege relationships. * @@ -222,6 +225,24 @@ namespace mongo { const PrivilegeVector& privileges); /** + * Adds the role described in "doc" the role graph. + */ + Status addRoleFromDocument(const BSONObj& doc); + + /** + * Applies to the RoleGraph the oplog operation described by the parameters. + * + * Returns Status::OK() on success, ErrorCodes::OplogOperationUnsupported if the oplog + * operation is not supported, and other codes (typically BadValue) if the oplog operation + * is ill-described. + */ + Status handleLogOp( + const char* op, + const NamespaceString& ns, + const BSONObj& o, + const BSONObj* o2); + + /** * Recomputes the indirect (getAllPrivileges) data for this graph. * * Must be called between calls to any of the mutation functions and calls |