diff options
author | James Wahlin <james@mongodb.com> | 2017-06-22 09:37:48 -0400 |
---|---|---|
committer | James Wahlin <james@mongodb.com> | 2017-07-25 12:24:49 -0400 |
commit | 079763d2cd06776edf81f3ecf6c32ab66d1742ec (patch) | |
tree | ec6abbf3db354b6af874a3eb5ced166fcca7a6f5 | |
parent | ffe9014101f7bd53ed9674b770e9371324fcdf34 (diff) | |
download | mongo-079763d2cd06776edf81f3ecf6c32ab66d1742ec.tar.gz |
SERVER-29371 Move auth privilege.h/.cpp into own library for use in agg
-rw-r--r-- | src/mongo/db/auth/SConscript | 55 | ||||
-rw-r--r-- | src/mongo/db/auth/authorization_manager.cpp | 1 | ||||
-rw-r--r-- | src/mongo/db/auth/authz_manager_external_state_local.cpp | 1 | ||||
-rw-r--r-- | src/mongo/db/auth/authz_manager_external_state_mock.cpp | 1 | ||||
-rw-r--r-- | src/mongo/db/auth/privilege.cpp | 1 | ||||
-rw-r--r-- | src/mongo/db/auth/privilege.h | 1 | ||||
-rw-r--r-- | src/mongo/db/auth/user_document_parser.cpp | 1 | ||||
-rw-r--r-- | src/mongo/db/commands/user_management_commands.cpp | 1 |
8 files changed, 39 insertions, 23 deletions
diff --git a/src/mongo/db/auth/SConscript b/src/mongo/db/auth/SConscript index 96feae1389b..07b685afa64 100644 --- a/src/mongo/db/auth/SConscript +++ b/src/mongo/db/auth/SConscript @@ -54,45 +54,56 @@ env.CppUnitTest( env.Library( target='authcore', source=[ - 'action_set.cpp', - 'action_type.cpp', 'authorization_manager.cpp', 'authorization_session.cpp', 'auth_decorations.cpp', 'authz_manager_external_state.cpp', 'authz_manager_external_state_local.cpp', 'authz_session_external_state.cpp', - 'privilege.cpp', - 'privilege_parser.cpp', - 'resource_pattern.cpp', 'role_graph.cpp', 'role_graph_update.cpp', 'role_graph_builtin_roles.cpp', 'user.cpp', 'user_document_parser.cpp', 'user_management_commands_parser.cpp', - 'user_set.cpp', + 'user_set.cpp' + ], + LIBDEPS=[ + 'address_restriction', + 'authprivilege', + 'auth_rolename', + 'authentication_restriction', + 'sasl_options', + 'user_name', + '$BUILD_DIR/mongo/base', + '$BUILD_DIR/mongo/bson/mutable/mutable_bson', + '$BUILD_DIR/mongo/bson/util/bson_extract', + '$BUILD_DIR/mongo/crypto/scramauth', + '$BUILD_DIR/mongo/db/catalog/document_validation', + '$BUILD_DIR/mongo/db/common', + '$BUILD_DIR/mongo/db/namespace_string', + '$BUILD_DIR/mongo/db/service_context', + '$BUILD_DIR/mongo/db/update/update_driver', + '$BUILD_DIR/mongo/util/md5', + '$BUILD_DIR/mongo/util/net/network', + ], +) + +env.Library( + target='authprivilege', + source=[ + 'action_set.cpp', + 'action_type.cpp', + 'privilege.cpp', + 'privilege_parser.cpp', + 'resource_pattern.cpp', ], LIBDEPS=[ - 'address_restriction', - 'auth_rolename', - 'authentication_restriction', - 'sasl_options', - 'user_name', '$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/bson/mutable/mutable_bson', - '$BUILD_DIR/mongo/bson/util/bson_extract', - '$BUILD_DIR/mongo/crypto/scramauth', - '$BUILD_DIR/mongo/db/catalog/document_validation', '$BUILD_DIR/mongo/db/common', - '$BUILD_DIR/mongo/db/mongod_options', - '$BUILD_DIR/mongo/db/namespace_string', - '$BUILD_DIR/mongo/db/service_context', - '$BUILD_DIR/mongo/db/update/update_driver', - '$BUILD_DIR/mongo/util/md5', - '$BUILD_DIR/mongo/util/net/network', - ], + ] ) + env.Library('authcommon', ['internal_user_auth.cpp'], LIBDEPS=[ diff --git a/src/mongo/db/auth/authorization_manager.cpp b/src/mongo/db/auth/authorization_manager.cpp index 5f72d9c04cd..0cac76e7398 100644 --- a/src/mongo/db/auth/authorization_manager.cpp +++ b/src/mongo/db/auth/authorization_manager.cpp @@ -47,6 +47,7 @@ #include "mongo/db/auth/authorization_session.h" #include "mongo/db/auth/authz_manager_external_state.h" #include "mongo/db/auth/privilege.h" +#include "mongo/db/auth/privilege_parser.h" #include "mongo/db/auth/role_graph.h" #include "mongo/db/auth/sasl_options.h" #include "mongo/db/auth/user.h" diff --git a/src/mongo/db/auth/authz_manager_external_state_local.cpp b/src/mongo/db/auth/authz_manager_external_state_local.cpp index 58b13d7099b..0613588be96 100644 --- a/src/mongo/db/auth/authz_manager_external_state_local.cpp +++ b/src/mongo/db/auth/authz_manager_external_state_local.cpp @@ -35,6 +35,7 @@ #include "mongo/bson/mutable/element.h" #include "mongo/bson/util/bson_extract.h" #include "mongo/db/auth/authorization_manager.h" +#include "mongo/db/auth/privilege_parser.h" #include "mongo/db/auth/user_document_parser.h" #include "mongo/db/operation_context.h" #include "mongo/db/server_options.h" diff --git a/src/mongo/db/auth/authz_manager_external_state_mock.cpp b/src/mongo/db/auth/authz_manager_external_state_mock.cpp index e735ab1757d..5d240e4bc83 100644 --- a/src/mongo/db/auth/authz_manager_external_state_mock.cpp +++ b/src/mongo/db/auth/authz_manager_external_state_mock.cpp @@ -36,6 +36,7 @@ #include "mongo/bson/mutable/element.h" #include "mongo/db/auth/authorization_manager.h" #include "mongo/db/auth/authz_session_external_state_mock.h" +#include "mongo/db/auth/privilege_parser.h" #include "mongo/db/jsobj.h" #include "mongo/db/matcher/expression_parser.h" #include "mongo/db/matcher/extensions_callback_disallow_extensions.h" diff --git a/src/mongo/db/auth/privilege.cpp b/src/mongo/db/auth/privilege.cpp index 25cd3141151..6e33bb54082 100644 --- a/src/mongo/db/auth/privilege.cpp +++ b/src/mongo/db/auth/privilege.cpp @@ -29,6 +29,7 @@ #include "mongo/db/auth/action_set.h" #include "mongo/db/auth/action_type.h" +#include "mongo/db/auth/privilege_parser.h" namespace mongo { diff --git a/src/mongo/db/auth/privilege.h b/src/mongo/db/auth/privilege.h index da6b054e012..c946123947f 100644 --- a/src/mongo/db/auth/privilege.h +++ b/src/mongo/db/auth/privilege.h @@ -31,7 +31,6 @@ #include "mongo/db/auth/action_set.h" #include "mongo/db/auth/action_type.h" -#include "mongo/db/auth/privilege_parser.h" #include "mongo/db/auth/resource_pattern.h" namespace mongo { diff --git a/src/mongo/db/auth/user_document_parser.cpp b/src/mongo/db/auth/user_document_parser.cpp index f1325910d2b..1b778ed4e17 100644 --- a/src/mongo/db/auth/user_document_parser.cpp +++ b/src/mongo/db/auth/user_document_parser.cpp @@ -36,6 +36,7 @@ #include "mongo/base/status.h" #include "mongo/db/auth/address_restriction.h" #include "mongo/db/auth/authorization_manager.h" +#include "mongo/db/auth/privilege_parser.h" #include "mongo/db/auth/user.h" #include "mongo/db/jsobj.h" #include "mongo/db/namespace_string.h" diff --git a/src/mongo/db/commands/user_management_commands.cpp b/src/mongo/db/commands/user_management_commands.cpp index 29827e90346..7a8d87fbc15 100644 --- a/src/mongo/db/commands/user_management_commands.cpp +++ b/src/mongo/db/commands/user_management_commands.cpp @@ -52,6 +52,7 @@ #include "mongo/db/auth/authorization_manager_global.h" #include "mongo/db/auth/authorization_session.h" #include "mongo/db/auth/privilege.h" +#include "mongo/db/auth/privilege_parser.h" #include "mongo/db/auth/resource_pattern.h" #include "mongo/db/auth/sasl_options.h" #include "mongo/db/auth/user.h" |