33using Bit . Api . AdminConsole . Public . Models . Response ;
44using Bit . Api . Models . Public . Response ;
55using Bit . Core ;
6- using Bit . Core . AdminConsole . Models . Business ;
76using Bit . Core . AdminConsole . Models . Data ;
87using Bit . Core . AdminConsole . OrganizationFeatures . OrganizationUsers . Interfaces ;
98using Bit . Core . AdminConsole . OrganizationFeatures . OrganizationUsers . InviteUsers ;
1413using Bit . Core . AdminConsole . Repositories ;
1514using Bit . Core . AdminConsole . Utilities . Commands ;
1615using Bit . Core . Auth . UserFeatures . TwoFactorAuth . Interfaces ;
17- using Bit . Core . Billing . Pricing ;
1816using Bit . Core . Billing . Services ;
1917using Bit . Core . Context ;
2018using Bit . Core . Enums ;
@@ -46,7 +44,6 @@ public class MembersController : Controller
4644 private readonly IRestoreOrganizationUserCommand _restoreOrganizationUserCommand ;
4745 private readonly IFeatureService _featureService ;
4846 private readonly IInviteOrganizationUsersCommand _inviteOrganizationUsersCommand ;
49- private readonly IPricingClient _pricingClient ;
5047 private readonly TimeProvider _timeProvider ;
5148
5249 public MembersController (
@@ -65,7 +62,6 @@ public MembersController(
6562 IRestoreOrganizationUserCommand restoreOrganizationUserCommand ,
6663 IFeatureService featureService ,
6764 IInviteOrganizationUsersCommand inviteOrganizationUsersCommand ,
68- IPricingClient pricingClient ,
6965 TimeProvider timeProvider )
7066 {
7167 _organizationUserRepository = organizationUserRepository ;
@@ -83,7 +79,6 @@ public MembersController(
8379 _restoreOrganizationUserCommand = restoreOrganizationUserCommand ;
8480 _featureService = featureService ;
8581 _inviteOrganizationUsersCommand = inviteOrganizationUsersCommand ;
86- _pricingClient = pricingClient ;
8782 _timeProvider = timeProvider ;
8883 }
8984
@@ -194,9 +189,7 @@ private async Task<IActionResult> PostInviteUserAsync_vNext(
194189 Core . AdminConsole . Entities . Organization organization ,
195190 bool hasStandaloneSecretsManager )
196191 {
197- var plan = await _pricingClient . GetPlanOrThrow ( organization . PlanType ) ;
198- var inviteOrganization = new InviteOrganization ( organization , plan ) ;
199- var request = model . ToInviteRequest ( inviteOrganization , hasStandaloneSecretsManager , Guid . Empty , _timeProvider . GetUtcNow ( ) ) ;
192+ var request = model . ToInviteRequest ( organization , hasStandaloneSecretsManager , Guid . Empty , _timeProvider . GetUtcNow ( ) ) ;
200193
201194 var result = await _inviteOrganizationUsersCommand . InviteImportedOrganizationUsersAsync ( request ) ;
202195
0 commit comments