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:
@@ -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; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user