[SERVER-34171] add virtual Command::isUserManagementCommand Created: 28/Mar/18  Updated: 29/Oct/23  Resolved: 28/Mar/18

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 3.7.4

Type: Improvement Priority: Minor - P4
Reporter: Billy Donahue Assignee: Billy Donahue
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Platforms 2018-04-09
Participants:

 Description   

commands.cpp currently maintains a whitelist of userManagementCommands strings.
It's only used to implement CommandHelpers::isUserManagementCommand.

Other intrinsic command properties like 'requiresAuth' etc are performed as virtual functions.
isUserManagementCommand should follow that pattern.

Then the isUserManagementCommand predicate stays correct by construction.



 Comments   
Comment by Githook User [ 28/Mar/18 ]

Author:

{'email': 'billy.donahue@mongodb.com', 'name': 'Billy Donahue', 'username': 'BillyDonahue'}

Message: SERVER-34171 Make isUserManagementCommand a property of Command.

...rather than a whitelist of names maintained in commands.h.
Branch: master
https://github.com/mongodb/mongo/commit/91c657b4f41b65525af5f4d299c723adcc890671

Generated at Thu Feb 08 04:35:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.