1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00

[AC-2206] Fix assigning Manage access to default collection (#3799)

* Fix assigning Manage access to default collection

The previous implementation did not work when creating an org as a
provider because the ownerId is null in OrganizationService.SignUp.
Added a null check and handled assigning access in ProviderService
instead.

* Tweaks
This commit is contained in:
Thomas Rittson
2024-02-15 00:41:51 +10:00
committed by GitHub
parent 97018e2501
commit a07aa8330c
6 changed files with 49 additions and 23 deletions

View File

@ -22,7 +22,7 @@ public static class OrganizationTestHelpers
var owner = await userRepository.GetByEmailAsync(ownerEmail);
return await organizationService.SignUpAsync(new OrganizationSignup
var signUpResult = await organizationService.SignUpAsync(new OrganizationSignup
{
Name = name,
BillingEmail = billingEmail,
@ -30,6 +30,8 @@ public static class OrganizationTestHelpers
OwnerKey = ownerKey,
Owner = owner,
});
return new Tuple<Organization, OrganizationUser>(signUpResult.organization, signUpResult.organizationUser);
}
public static async Task<OrganizationUser> CreateUserAsync<T>(