mirror of
https://github.com/bitwarden/server
synced 2025-12-17 00:33:23 +00:00
[AC-432] Checking if any of the selected Organizations is already assigned to a Provider
This commit is contained in:
@@ -67,4 +67,16 @@ public class ProviderOrganizationRepository :
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<ProviderOrganization>> GetManyByOrganizationIdsAsync(IEnumerable<Guid> organizationIds)
|
||||
{
|
||||
using (var scope = ServiceScopeFactory.CreateScope())
|
||||
{
|
||||
var dbContext = GetDatabaseContext(scope);
|
||||
var query = from po in dbContext.ProviderOrganizations
|
||||
where organizationIds.Contains(po.OrganizationId)
|
||||
select po;
|
||||
return await query.ToListAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user