1
0
mirror of https://github.com/bitwarden/server synced 2025-12-27 05:33:17 +00:00

[SM-722] Add optional access to secrets for service account lists (#3074)

* Add access to secret count to service account list

* dotnet format

* refactor into query

* Remove duplicate

* Add new method to noop
This commit is contained in:
Thomas Avery
2023-08-03 10:06:34 -05:00
committed by GitHub
parent d94a54516e
commit 73c6421bd3
11 changed files with 192 additions and 17 deletions

View File

@@ -1,5 +1,6 @@
using Bit.Core.Models.Api;
using Bit.Core.SecretsManager.Entities;
using Bit.Core.SecretsManager.Models.Data;
namespace Bit.Api.SecretsManager.Models.Response;
@@ -35,3 +36,18 @@ public class ServiceAccountResponseModel : ResponseModel
public DateTime RevisionDate { get; set; }
}
public class ServiceAccountSecretsDetailsResponseModel : ServiceAccountResponseModel
{
public ServiceAccountSecretsDetailsResponseModel(ServiceAccountSecretsDetails serviceAccountDetails) : base(serviceAccountDetails.ServiceAccount)
{
if (serviceAccountDetails == null)
{
throw new ArgumentNullException(nameof(serviceAccountDetails));
}
AccessToSecrets = serviceAccountDetails.AccessToSecrets;
}
public int AccessToSecrets { get; set; }
}