1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 16:42:50 -05:00

[PM-11360] Remove export permission for providers (#5051)

- also fix managed collections export from CLI
This commit is contained in:
Thomas Rittson
2024-12-06 08:07:04 +10:00
committed by GitHub
parent 1f1510f4d4
commit 6a9b7ece2b
13 changed files with 428 additions and 2 deletions

View File

@ -0,0 +1,20 @@
using Microsoft.AspNetCore.Authorization.Infrastructure;
namespace Bit.Api.Tools.Authorization;
public class VaultExportOperationRequirement : OperationAuthorizationRequirement;
public static class VaultExportOperations
{
/// <summary>
/// Exporting the entire organization vault.
/// </summary>
public static readonly VaultExportOperationRequirement ExportWholeVault =
new() { Name = nameof(ExportWholeVault) };
/// <summary>
/// Exporting only the organization items that the user has Can Manage permissions for
/// </summary>
public static readonly VaultExportOperationRequirement ExportManagedCollections =
new() { Name = nameof(ExportManagedCollections) };
}