mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 08:02:49 -05:00
[PM-11360] Remove export permission for providers (#5051)
- also fix managed collections export from CLI
This commit is contained in:
@ -153,6 +153,7 @@ public static class FeatureFlagKeys
|
||||
public const string NewDeviceVerificationPermanentDismiss = "new-device-permanent-dismiss";
|
||||
public const string SecurityTasks = "security-tasks";
|
||||
public const string PM14401_ScaleMSPOnClientOrganizationUpdate = "PM-14401-scale-msp-on-client-organization-update";
|
||||
public const string PM11360RemoveProviderExportPermission = "pm-11360-remove-provider-export-permission";
|
||||
public const string DisableFreeFamiliesSponsorship = "PM-12274-disable-free-families-sponsorship";
|
||||
public const string MacOsNativeCredentialSync = "macos-native-credential-sync";
|
||||
public const string PM9111ExtensionPersistAddEditForm = "pm-9111-extension-persist-add-edit-form";
|
||||
|
@ -27,4 +27,14 @@ public interface IOrganizationCiphersQuery
|
||||
/// </summary>
|
||||
/// <exception cref="FeatureUnavailableException"></exception>
|
||||
Task<IEnumerable<CipherOrganizationDetails>> GetUnassignedOrganizationCiphers(Guid organizationId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns ciphers belonging to the organization that are in the specified collections.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Note that the <see cref="CipherOrganizationDetailsWithCollections.CollectionIds"/> will include all collections
|
||||
/// the cipher belongs to even if it is not in the <paramref name="collectionIds"/> parameter.
|
||||
/// </remarks>
|
||||
public Task<IEnumerable<CipherOrganizationDetailsWithCollections>> GetOrganizationCiphersByCollectionIds(
|
||||
Guid organizationId, IEnumerable<Guid> collectionIds);
|
||||
}
|
||||
|
@ -52,4 +52,13 @@ public class OrganizationCiphersQuery : IOrganizationCiphersQuery
|
||||
{
|
||||
return await _cipherRepository.GetManyUnassignedOrganizationDetailsByOrganizationIdAsync(organizationId);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<IEnumerable<CipherOrganizationDetailsWithCollections>> GetOrganizationCiphersByCollectionIds(
|
||||
Guid organizationId, IEnumerable<Guid> collectionIds)
|
||||
{
|
||||
var managedCollectionIds = collectionIds.ToHashSet();
|
||||
var allOrganizationCiphers = await GetAllOrganizationCiphers(organizationId);
|
||||
return allOrganizationCiphers.Where(c => c.CollectionIds.Intersect(managedCollectionIds).Any());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user