[SERVER-45161] AuthorizationManagerWithExplicitUserPrivilegesTest is never used Created: 16/Dec/19  Updated: 29/Oct/23  Resolved: 10/Jun/21

Status: Closed
Project: Core Server
Component/s: Security
Affects Version/s: None
Fix Version/s: 5.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Kevin Pulo Assignee: Aldo Aguilar
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Security 2021-06-14
Participants:

 Description   

The AuthorizationManagerWithExplicitUserPrivilegesTest fixture is present in db/auth/authorization_manager_test.cpp along with the AuthzManagerExternalStateMockWithExplicitUserPrivileges helper, but neither are actually used anywhere in the codebase.

$ rg AuthorizationManagerWithExplicitUserPrivilegesTest
src/mongo/db/auth/authorization_manager_test.cpp
264:class AuthorizationManagerWithExplicitUserPrivilegesTest : public ::mongo::unittest::Test {
$ rg AuthzManagerExternalStateMockWithExplicitUserPrivileges
src/mongo/db/auth/authorization_manager_test.cpp
232:class AuthzManagerExternalStateMockWithExplicitUserPrivileges
268:            std::make_unique<AuthzManagerExternalStateMockWithExplicitUserPrivileges>();
279:    AuthzManagerExternalStateMockWithExplicitUserPrivileges* externalState;

Is this intentional? If so, then they should be removed. If not, then they should be used by appropriate unittests.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 08/Jun/21 ]

Author:

{'name': 'aldo-aguilar', 'email': 'aldo.aguilar@mongodb.com'}

Message: SERVER-45161 Remove AuthorizationManagerWithExplicitUserPrivilegesTest
Branch: master
https://github.com/mongodb/mongo/commit/787e5d3e46eb68156d85da5ed43a5d4e34ad4e46

Comment by Mark Benvenuto [ 01/Jun/21 ]

Remove the class AuthzManagerExternalStateMockWithExplicitUserPrivileges from src/mongo/db/auth/authorization_manager_test.cpp since it is not used.

Generated at Thu Feb 08 05:08:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.