diff options
author | Spencer T Brody <spencer@10gen.com> | 2013-09-30 18:40:39 -0400 |
---|---|---|
committer | Spencer T Brody <spencer@10gen.com> | 2013-10-04 17:17:51 -0400 |
commit | d09e608691aae000f3176b27cc67a7900229cd1e (patch) | |
tree | 8740c59feef65ab28b7b8dc55fc85996a71acaed /src/mongo/db/auth/user_management_commands_parser.h | |
parent | e0f70cdb67a36c831a23b452e7b9fba41f512ae0 (diff) | |
download | mongo-d09e608691aae000f3176b27cc67a7900229cd1e.tar.gz |
SERVER-9515 Implement several remaining role manipulation commands
Diffstat (limited to 'src/mongo/db/auth/user_management_commands_parser.h')
-rw-r--r-- | src/mongo/db/auth/user_management_commands_parser.h | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/src/mongo/db/auth/user_management_commands_parser.h b/src/mongo/db/auth/user_management_commands_parser.h index d1bca97c5ad..4d49ebb77a3 100644 --- a/src/mongo/db/auth/user_management_commands_parser.h +++ b/src/mongo/db/auth/user_management_commands_parser.h @@ -39,9 +39,6 @@ #include "mongo/db/jsobj.h" namespace mongo { - - class AuthorizationManager; - namespace auth { struct CreateOrUpdateUserArgs { @@ -69,9 +66,11 @@ namespace auth { /** * Takes a command object describing an invocation of one of "grantRolesToUser", - * "revokeRolesFromUser", "grantDelegateRolesToUser", and "revokeDelegateRolesFromUser" (which - * command it is is specified in the "cmdName" argument), and parses out the user name of the - * user being modified, the roles being granted or revoked, and the write concern to use. + * "revokeRolesFromUser", "grantDelegateRolesToUser", "revokeDelegateRolesFromUser", + * "grantRolesToRole", and "revokeRolesFromRoles" (which command it is is specified in the + * "cmdName" argument), and parses out (into the parsedName out param) the user/role name of + * the user/roles being modified, the roles being granted or revoked, and the write concern to + * use. */ Status parseRolePossessionManipulationCommands(const BSONObj& cmdObj, const StringData& cmdName, @@ -83,7 +82,7 @@ namespace auth { /** * Takes a command object describing an invocation of the "removeUser" command and parses out - * the userName of the user to be removed and the writeConcern. + * the UserName of the user to be removed and the writeConcern. * Also validates the input and returns a non-ok Status if there is anything wrong. */ Status parseAndValidateRemoveUserCommand(const BSONObj& cmdObj, @@ -144,5 +143,22 @@ namespace auth { PrivilegeVector* parsedPrivileges, BSONObj* parsedWriteConcern); + /** + * Takes a command object describing an invocation of the "removeRole" command and parses out + * the RoleName of the role to be removed and the writeConcern. + */ + Status parseRemoveRoleCommand(const BSONObj& cmdObj, + const std::string& dbname, + RoleName* parsedRoleName, + BSONObj* parsedWriteConcern); + + /** + * Takes a command object describing an invocation of the "removeRolesFromDatabase" command and + * parses out the write concern. + */ + Status parseRemoveRolesFromDatabaseCommand(const BSONObj& cmdObj, + const std::string& dbname, + BSONObj* parsedWriteConcern); + } // namespace auth } // namespace mongo |