diff --git a/src/Api/SecretsManager/Controllers/AccessPoliciesController.cs b/src/Api/SecretsManager/Controllers/AccessPoliciesController.cs index e4f6f6869d..e8a007541f 100644 --- a/src/Api/SecretsManager/Controllers/AccessPoliciesController.cs +++ b/src/Api/SecretsManager/Controllers/AccessPoliciesController.cs @@ -204,7 +204,7 @@ public class AccessPoliciesController : Controller var organizationUsers = await _organizationUserRepository.GetManyDetailsByOrganizationAsync(id); var userResponses = organizationUsers - .Where(user => user.AccessSecretsManager) + .Where(user => user.AccessSecretsManager && user.Status == OrganizationUserStatusType.Confirmed) .Select(userDetails => new PotentialGranteeResponseModel(userDetails)); return new ListResponseModel(userResponses.Concat(groupResponses)); diff --git a/test/Api.IntegrationTest/SecretsManager/Controllers/AccessPoliciesControllerTest.cs b/test/Api.IntegrationTest/SecretsManager/Controllers/AccessPoliciesControllerTest.cs index c6e481ebd5..a37567739e 100644 --- a/test/Api.IntegrationTest/SecretsManager/Controllers/AccessPoliciesControllerTest.cs +++ b/test/Api.IntegrationTest/SecretsManager/Controllers/AccessPoliciesControllerTest.cs @@ -702,7 +702,6 @@ public class AccessPoliciesControllerTest : IClassFixture result!.UserAccessPolicies.First(ap => ap.OrganizationUserId == ownerOrgUserId).OrganizationUserId); Assert.True(result.UserAccessPolicies.First().Read); Assert.True(result.UserAccessPolicies.First().Write); - AssertHelper.AssertRecent(result.UserAccessPolicies.First().RevisionDate); var createdAccessPolicy = await _accessPolicyRepository.GetByIdAsync(result.UserAccessPolicies.First().Id); @@ -710,7 +709,6 @@ public class AccessPoliciesControllerTest : IClassFixture Assert.Equal(result.UserAccessPolicies.First().Read, createdAccessPolicy!.Read); Assert.Equal(result.UserAccessPolicies.First().Write, createdAccessPolicy.Write); Assert.Equal(result.UserAccessPolicies.First().Id, createdAccessPolicy.Id); - AssertHelper.AssertRecent(createdAccessPolicy.RevisionDate); } [Fact]