mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 16:42:50 -05:00
fix: set orgUser Id for collection access when creating reseller org, refs AC-2214 (#3839)
This commit is contained in:
@ -2526,7 +2526,7 @@ public class OrganizationService : IOrganizationService
|
||||
});
|
||||
}
|
||||
|
||||
public async Task InitPendingOrganization(Guid userId, Guid organizationId, string publicKey, string privateKey, string collectionName)
|
||||
public async Task InitPendingOrganization(Guid userId, Guid organizationId, Guid organizationUserId, string publicKey, string privateKey, string collectionName)
|
||||
{
|
||||
await ValidateSignUpPoliciesAsync(userId);
|
||||
|
||||
@ -2565,9 +2565,8 @@ public class OrganizationService : IOrganizationService
|
||||
List<CollectionAccessSelection> defaultOwnerAccess = null;
|
||||
if (org.FlexibleCollections)
|
||||
{
|
||||
var orgUser = await _organizationUserRepository.GetByOrganizationAsync(org.Id, userId);
|
||||
defaultOwnerAccess =
|
||||
[new CollectionAccessSelection { Id = orgUser.Id, HidePasswords = false, ReadOnly = false, Manage = true }];
|
||||
[new CollectionAccessSelection { Id = organizationUserId, HidePasswords = false, ReadOnly = false, Manage = true }];
|
||||
}
|
||||
|
||||
var defaultCollection = new Collection
|
||||
|
Reference in New Issue
Block a user